[Pkg-privacy-commits] [tails-installer] 07/08: Propagate the error message better

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


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

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

commit 5f7950061136db5c3ee68511d813b166d13f719f
Author: Martin Briza <mbriza at redhat.com>
Date:   Thu Apr 21 17:03:41 2016 +0200

    Propagate the error message better
---
 liveusb/gui.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/liveusb/gui.py b/liveusb/gui.py
index 91b2a95..6dc8d9f 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -81,7 +81,7 @@ class ReleaseDownloadThread(QThread):
             self.progress.end()
             self.downloadFinished.emit(filename)
         except LiveUSBError as e:
-            self.progress.release.addError(e.args[0])
+            self.downloadError.emit(e.args[0])
 
     def terminate(self):
         QThread.terminate(self)
@@ -147,6 +147,7 @@ class ReleaseDownload(QObject):
     @pyqtSlot(str)
     def childError(self, err):
         self.reset()
+        self.release.addError(err)
 
     @pyqtSlot(str)
     def run(self):
@@ -335,6 +336,7 @@ class Release(QObject):
         self._download.runningChanged.connect(self.statusChanged)
         self._writer.runningChanged.connect(self.statusChanged)
         self._writer.statusChanged.connect(self.statusChanged)
+        self.errorChanged.connect(self.statusChanged)
 
         parent.releaseProxyModel.archChanged.connect(self.sizeChanged)
         parent.releaseProxyModel.archChanged.connect(self.pathChanged)
@@ -469,7 +471,7 @@ class Release(QObject):
 
     @pyqtProperty(str, notify=statusChanged)
     def status(self):
-        if not self._download.running and not self.readyToWrite and not self._writer.running:
+        if not self._download.running and not self.readyToWrite and not self._writer.running and len(self._error) == 0:
             return _('Starting')
         elif self._download.running:
             return _('Downloading')

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