[Pkg-privacy-commits] [tails-installer] 04/27: Handle ISO layout detection in Linux

Intrigeri intrigeri at moszumanska.debian.org
Wed May 24 15:26:58 UTC 2017


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to tag 3.91.0
in repository tails-installer.

commit 126ba936d185935c70af63af17e8558e717f1de9
Author: Martin Briza <mbriza at redhat.com>
Date:   Tue Jan 26 14:44:40 2016 +0100

    Handle ISO layout detection in Linux
---
 liveusb/creator.py | 9 ++++++---
 liveusb/gui.py     | 6 ------
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/liveusb/creator.py b/liveusb/creator.py
index bfa0986..77d6c84 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -53,12 +53,14 @@ class LiveUSBError(Exception):
         else:
             self.short = fullMessage
 
+
 class Drive(object):
     friendlyName = ''
     device = ''
-    uuid = ''
+    uuid = '' # TODO handle UUID detection in Windows, seems not important in Linux
     size = 0
     type = 'usb' # so far only this, mmc/sd in the future
+    isIso9660 = False
 
 class LiveUSBCreator(object):
     """ An OS-independent parent class for Live USB Creators """
@@ -270,7 +272,7 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
             if ('org.freedesktop.UDisks2.Block' in device and
                 'org.freedesktop.UDisks2.Filesystem' not in device and
                 'org.freedesktop.UDisks2.Partition' not in device):
-                self.log.debug('Found a block device without a filesystem on %s' % name)
+                self.log.debug('Found a block device that is not a partition on %s' % name)
             else:
                 return
 
@@ -295,7 +297,7 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
             data.device = blk['Device']
             data.size = int(blk['Size'])
             data.friendlyName = str(drive['Vendor']) + ' ' + str(drive['Model'])
-            data.uuid = str(blk['IdUUID'])
+            data.isIso9660 = blk['IdType'] == 'iso9660'
             if drive['ConnectionBus'] == 'usb':
                 data.type = 'usb'
             else:
@@ -455,6 +457,7 @@ class MacOsLiveUSBCreator(LiveUSBCreator):
 
 
 class WindowsLiveUSBCreator(LiveUSBCreator):
+    # TODO handle UUID detection in Windows
 
     def detect_removable_drives(self, callback=None):
         import win32file, win32api, pywintypes
diff --git a/liveusb/gui.py b/liveusb/gui.py
index 0e19f8a..14f1f6f 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -248,12 +248,6 @@ class ReleaseWriterThread(QThread):
         #self.live.log.addHandler(handler)
         now = datetime.now()
         try:
-            if not self.live.drive.uuid and not self.live.label:
-                self.parent.release.addError(_('Error: Cannot set the label or obtain '
-                              'the UUID of your device.  Unable to continue.'))
-                self.parent.running = False
-                return
-
             self.ddImage(now)
 
         except Exception, e:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tails-installer.git



More information about the Pkg-privacy-commits mailing list