aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorpapoteur-mga <yves.brungard_git@gadz.org>2013-11-23 21:44:32 +0100
committerpapoteur-mga <yves.brungard_git@gadz.org>2013-11-23 21:44:32 +0100
commit45a6332aaf56ae045f6435b6cc1315a3313cfc8f (patch)
tree5301012ba8f329d66afd6498f89f93c75c43726f /lib
parent5b6b20aca48ea9b9be4b534f127a4989d650fdae (diff)
downloadisodumper-45a6332aaf56ae045f6435b6cc1315a3313cfc8f.tar
isodumper-45a6332aaf56ae045f6435b6cc1315a3313cfc8f.tar.gz
isodumper-45a6332aaf56ae045f6435b6cc1315a3313cfc8f.tar.bz2
isodumper-45a6332aaf56ae045f6435b6cc1315a3313cfc8f.tar.xz
isodumper-45a6332aaf56ae045f6435b6cc1315a3313cfc8f.zip
Added catch for writing error.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/isodumper.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py
index 81843f8..e5f7dac 100755
--- a/lib/isodumper.py
+++ b/lib/isodumper.py
@@ -214,7 +214,11 @@ class IsoDumper:
self.logview.scroll_to_mark(mark, 0.05, True, 0.0, 1.0)
progress.set_fraction(float(indice)/100)
indice +=1
- os.fsync(ofc)
+ try:
+ os.fsync(ofc)
+ except:
+ self.logger(_("Writing error."))
+ self.emergency()
yield True
progress.set_fraction(1.0)
self.logger(_('Image ')+source.split('/')[-1]+_(' successfully written to')+target)