projects
/
grml2usb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Silent error for StandardError, not RuntimeError
[grml2usb.git]
/
grml2usb
diff --git
a/grml2usb
b/grml2usb
index
da6bfe0
..
cdbb3e8
100755
(executable)
--- a/
grml2usb
+++ b/
grml2usb
@@
-170,13
+170,14
@@
def cleanup():
proc = subprocess.Popen(["sync"])
proc.wait()
proc = subprocess.Popen(["sync"])
proc.wait()
- for device in MOUNTED:
+ for device in MOUNTED
.copy()
:
try:
unmount(device, "")
try:
unmount(device, "")
- except RuntimeError:
+ logging.debug('Unmounted %s' % device)
+ except StandardError:
logging.debug('RuntimeError while umount %s, ignoring' % device)
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
try:
if os.path.isdir(tmppath) and not os.path.islink(tmppath):
# symbolic links to directories are ignored
@@
-188,7
+189,7
@@
def cleanup():
os.unlink(tmppath)
logging.debug('temporary file %s deleted' % tmppath)
unregister_tmpfile(tmppath)
os.unlink(tmppath)
logging.debug('temporary file %s deleted' % tmppath)
unregister_tmpfile(tmppath)
- except
Runtime
Error:
+ except
Standard
Error:
msg = 'RuntimeError while removing temporary %s, ignoring'
logging.debug(msg % tmppath)
msg = 'RuntimeError while removing temporary %s, ignoring'
logging.debug(msg % tmppath)