[Pkg-privacy-commits] [tails-installer] 166/210: Prevent crash on Windows when the ISO path is not formatted well
Intrigeri
intrigeri at moszumanska.debian.org
Wed May 24 15:26:41 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 76ebdf665b16594c4f6745e7c024bfd385dd88bf
Author: Martin Briza <mbriza at redhat.com>
Date: Wed Sep 9 14:01:51 2015 +0200
Prevent crash on Windows when the ISO path is not formatted well
---
liveusb/creator.py | 1 -
liveusb/gui.py | 10 +++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/liveusb/creator.py b/liveusb/creator.py
index 7c1b244..009666d 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -869,7 +869,6 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
shutil.rmtree(syslinux_path)
except OSError, e:
pass
- print (self.dest, syslinux_path)
shutil.move(os.path.join(self.dest, "isolinux"), syslinux_path)
try:
os.unlink(os.path.join(syslinux_path, "isolinux.cfg"))
diff --git a/liveusb/gui.py b/liveusb/gui.py
index bc619e2..79e1cb8 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -112,6 +112,7 @@ class ReleaseDownload(QObject, BaseMeter):
QObject.__init__(self, parent)
self.release = parent
self._grabber = ReleaseDownloadThread(self, parent.live.get_proxies())
+ self._live = parent.live
def reset(self):
self._running = False
@@ -184,7 +185,7 @@ class ReleaseDownload(QObject, BaseMeter):
def path(self, value):
if self._path != value:
self._path = value
- self.parent().live.set_iso(value)
+ self._live.set_iso(value)
self.pathChanged.emit()
class ReleaseWriterProgressThread(QThread):
@@ -434,6 +435,8 @@ class Release(QObject):
pathChanged = pyqtSignal()
sizeChanged = pyqtSignal()
+ _path = ''
+
_archMap = {'64bit': ['x86_64'], '32bit': ['i686','i386'], 'ARM': ['armv7hl']}
def __init__(self, parent, index, live, data):
@@ -446,7 +449,6 @@ class Release(QObject):
self._size = 0
self._data = data
- self._path = ''
self._info = []
self._warning = []
@@ -587,7 +589,9 @@ class Release(QObject):
@path.setter
def path(self, value):
- if value.startswith('file://'):
+ if sys.platform.startswith('win') and value.startswith('file:///'):
+ value = value.replace('file:///', '', 1)
+ elif not sys.platform.startswith('win') and value.startswith('file://'):
value = value.replace('file://', '', 1)
if self._path != value:
self._download.path = value
--
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