[Pkg-privacy-commits] [tails-installer] 127/210: Fix Windows builds
Intrigeri
intrigeri at moszumanska.debian.org
Wed May 24 15:26:37 UTC 2017
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to tag 3.90.0
in repository tails-installer.
commit afdc2a1c9777c6a04179750d0032ea66e9de03b2
Author: Martin Briza <mbriza at redhat.com>
Date: Mon Aug 17 12:54:45 2015 +0200
Fix Windows builds
---
liveusb-creator.spec | 2 +-
liveusb/creator.py | 15 ++++++---------
liveusb/gui.py | 2 +-
3 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/liveusb-creator.spec b/liveusb-creator.spec
index ed0fc7f..bf6772f 100644
--- a/liveusb-creator.spec
+++ b/liveusb-creator.spec
@@ -13,7 +13,7 @@ def stripDebug(list):
a = Analysis(['liveusb-creator'],
pathex=['Z:\\home\\mbriza\\upstream\\liveusb-creator'],
- hiddenimports=[],
+ hiddenimports=['pyquery'],
hookspath=None,
runtime_hooks=None)
pyz = PYZ(a.pure)
diff --git a/liveusb/creator.py b/liveusb/creator.py
index 80b9506..3539308 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -516,11 +516,10 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
'that does not support the ext4 filesystem'))
self.valid_fstypes -= set(['ext4'])
- def detect_removable_drives(self, callbackAdded=None, callbackRemoved=None):
+ def detect_removable_drives(self, callback=None):
""" Detect all removable USB storage devices using UDisks2 via D-Bus """
import dbus
- self.callbackAdded = callbackAdded
- self.callbackRemoved = callbackRemoved
+ self.callback = callback
self.drives = {}
self.bus = dbus.SystemBus()
"""
@@ -675,15 +674,15 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
self.drives[name] = data
- if self.callbackAdded:
- self.callbackAdded()
+ if self.callback:
+ self.callback()
def handleRemoved(path, interfaces):
if self.drives.has_key(path):
del self.drives[path]
- if self.callbackRemoved:
- self.callbackRemoved()
+ if self.callback:
+ self.callback()
self.bus.add_signal_receiver(handleAdded, "InterfacesAdded", "org.freedesktop.DBus.ObjectManager", "org.freedesktop.UDisks2", "/org/freedesktop/UDisks2")
self.bus.add_signal_receiver(handleRemoved, "InterfacesRemoved", "org.freedesktop.DBus.ObjectManager", "org.freedesktop.UDisks2", "/org/freedesktop/UDisks2")
@@ -1131,8 +1130,6 @@ class WindowsLiveUSBCreator(LiveUSBCreator):
except Exception, e:
self.log.exception(e)
self.log.error(_("Error probing device"))
- if not len(self.drives):
- raise LiveUSBError(_("Unable to find any removable devices"))
if callback:
callback()
diff --git a/liveusb/gui.py b/liveusb/gui.py
index 6db126b..1f2f5c3 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -787,7 +787,7 @@ class LiveUSBData(QObject):
self._usbDrives = []
self.currentDriveChanged.connect(self.currentImage.inspectDestination)
- self.live.detect_removable_drives(callbackAdded=self.USBDeviceCallback, callbackRemoved=self.USBDeviceCallback)
+ self.live.detect_removable_drives(callback=self.USBDeviceCallback)
def USBDeviceCallback(self):
--
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