From 05ac087387d64da87d948db975ec7e85ef0398ea Mon Sep 17 00:00:00 2001 From: papoteur-mga Date: Sat, 2 Nov 2013 09:19:16 +0100 Subject: Added warning for device bigger as 32Gbytes --- lib/isodumper.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'lib') 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') -- cgit v1.2.1