diff options
author | papoteur-mga <yves.brungard_git@gadz.org> | 2013-11-02 09:19:16 +0100 |
---|---|---|
committer | papoteur-mga <yves.brungard_git@gadz.org> | 2013-11-02 09:19:16 +0100 |
commit | 05ac087387d64da87d948db975ec7e85ef0398ea (patch) | |
tree | 8c9bb87eeaf21c4dfb1c85e6815b99c5baeb1421 | |
parent | fcad8d3108f2e1529f9a73a2dc63296995a910be (diff) | |
download | isodumper-05ac087387d64da87d948db975ec7e85ef0398ea.tar isodumper-05ac087387d64da87d948db975ec7e85ef0398ea.tar.gz isodumper-05ac087387d64da87d948db975ec7e85ef0398ea.tar.bz2 isodumper-05ac087387d64da87d948db975ec7e85ef0398ea.tar.xz isodumper-05ac087387d64da87d948db975ec7e85ef0398ea.zip |
Added warning for device bigger as 32Gbytes
-rwxr-xr-x | lib/isodumper.py | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py index 3dcd803..1bdf312 100755 --- a/lib/isodumper.py +++ b/lib/isodumper.py @@ -87,7 +87,6 @@ class IsoDumper: list = Popen(["/usr/lib/isodumper/find_devices"], stdout=PIPE).communicate()[0] if (exit_dialog==2) : dialog.destroy() - #self.close('dummy') exit(0) self.combo = self.wTree.get_widget("device_combobox") list = list.strip().split('\n') @@ -115,22 +114,26 @@ class IsoDumper: dialog = self.wTree.get_widget("confirm_dialog") self.logger(_('Image: ')+source) self.logger(_('Target Device: ')+self.dev) - self.logger(self.deviceSize) b = os.path.getsize(source) - self.logger(str(b)) if b >= (eval(self.deviceSize)) : self.logger(_('The device is too small to contain the ISO file.')) self.emergency() else: resp = dialog.run() if resp: - self.do_umount(target) - dialog.hide() - task = self.raw_write(source, target) - gobject.idle_add(task.next) - while gtk.events_pending(): - gtk.main_iteration(True) - + if eval(self.deviceSize)> 1024*1024*1024*32 : + message=self.wTree.get_widget("label1") + message.set_text(_('The device is bigger than 32 Gbytes. Are you sure you want use it?')) + resp = dialog.run() + if resp: + self.do_umount(target) + dialog.hide() + task = self.raw_write(source, target) + gobject.idle_add(task.next) + while gtk.events_pending(): + gtk.main_iteration(True) + else: + self.close('dummy') else: self.close('dummy') |