[Pkg-privacy-commits] [tails-installer] 08/30: Fix crash on partially null wmi data

Intrigeri intrigeri at moszumanska.debian.org
Wed May 24 15:27:08 UTC 2017


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

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

commit 2aa624f431cae17bc74dba3f6ce24d21f97adbce
Author: Martin Bříza <m at rtinbriza.cz>
Date:   Mon Apr 4 10:56:50 2016 +0200

    Fix crash on partially null wmi data
---
 liveusb/creator.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/liveusb/creator.py b/liveusb/creator.py
index 638f385..16fe461 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -521,7 +521,7 @@ class WindowsLiveUSBCreator(LiveUSBCreator):
             c = wmi.WMI()
             drives = {}
             for d in c.Win32_DiskDrive():
-                if 7 not in d.Capabilities or 'USB' != d.InterfaceType: # does not support removable media
+                if not d.Capabilities or 7 not in d.Capabilities or 'USB' != d.InterfaceType: # does not support removable media
                     continue
 
                 data = Drive()
@@ -574,6 +574,8 @@ class WindowsLiveUSBCreator(LiveUSBCreator):
     def dd_image(self, update_function=None):
         import re
 
+        print("AAA")
+
         if update_function:
             update_function(-1.0)
 
@@ -590,11 +592,13 @@ class WindowsLiveUSBCreator(LiveUSBCreator):
 
         if update_function:
             update_function(0.0)
+        print("Writing" + self.iso)
         dd = subprocess.Popen([os.path.dirname(sys.argv[0])+'/tools/dd.exe', 'bs=1M', 'if='+self.iso, 'of=\\\\.\\PHYSICALDRIVE'+self.drive.device], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
         if update_function:
             while dd.poll() is None:
                 buf = dd.stdout.read(256)
                 r = re.match(buf, '^[^ ]+ ([0-9]+)%')
+                print(buf)
                 if r:
                     update_function(float(r.group(1)/100.0))
         else:

-- 
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