liveusb/creator.py liveusb/gui.py

Luke Macken lmacken at fedoraproject.org
Thu Jun 23 20:13:16 UTC 2011


 liveusb/creator.py |    3 ---
 liveusb/gui.py     |    4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit c3822b50d78dd80130028828929c1884008c3a59
Author: Luke Macken <lmacken at redhat.com>
Date:   Thu Jun 23 16:12:42 2011 -0400

    Fix our error message when we can't find any USB drives.
    
    This stopped working properly when we ported from HAL to UDisks.

diff --git a/liveusb/creator.py b/liveusb/creator.py
index f8a3f5a..3d9c411 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -513,9 +513,6 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
             if callback:
                 callback()
 
-            if not len(self.drives):
-                raise LiveUSBError(_("Unable to find any USB drives"))
-
         def handle_error(error):
             self.log.error(str(error))
 
diff --git a/liveusb/gui.py b/liveusb/gui.py
index 806baa9..9d1850b 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -304,6 +304,10 @@ class LiveUSBDialog(QtGui.QDialog, LiveUSBInterface):
         self.driveBox.clear()
         #self.textEdit.clear()
         def add_devices():
+            if not len(self.live.drives):
+                self.textEdit.setPlainText(_("Unable to find any USB drives"))
+                self.startButton.setEnabled(False)
+                return
             for device, info in self.live.drives.items():
                 if info['label']:
                     self.driveBox.addItem("%s (%s)" % (device, info['label']))




More information about the liveusb-creator mailing list