X-Git-Url: http://git.grml.org/?p=grml2usb.git;a=blobdiff_plain;f=grml2usb;h=94f73ed058289511b980824474f1382ac3ecd5c4;hp=93b1d115d52dc8826d1e2bed753c683924aef0ef;hb=b2b4887f7616a7316f22521479a600a15668339c;hpb=1d3c9dab80aa6b80764e852865d5e224f6548fd3 diff --git a/grml2usb b/grml2usb index 93b1d11..94f73ed 100755 --- a/grml2usb +++ b/grml2usb @@ -170,14 +170,14 @@ def cleanup(): proc = subprocess.Popen(["sync"]) proc.wait() - for device in MOUNTED: + for device in MOUNTED.copy(): try: unmount(device, "") logging.debug('Unmounted %s' % device) except RuntimeError: logging.debug('RuntimeError while umount %s, ignoring' % device) - for tmppath in TMPFILES: + for tmppath in TMPFILES.copy(): try: if os.path.isdir(tmppath) and not os.path.islink(tmppath): # symbolic links to directories are ignored