From a0d4429a32a39f6f30893f9ab50b4afbc527a1a3 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 12 Jun 2014 10:17:49 +0200 Subject: [PATCH] Log download errors --- qutebrowser/browser/downloads.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qutebrowser/browser/downloads.py b/qutebrowser/browser/downloads.py index 833b7d65b..1a3571e76 100644 --- a/qutebrowser/browser/downloads.py +++ b/qutebrowser/browser/downloads.py @@ -77,6 +77,7 @@ class DownloadItem(QObject): reply.downloadProgress.connect(self.on_download_progress) reply.finished.connect(self.on_finished) reply.finished.connect(self.finished) + reply.error.connect(self.on_error) self.timer = QTimer() self.timer.timeout.connect(self.update_speed) self.timer.setInterval(self.REFRESH_INTERVAL) @@ -139,6 +140,10 @@ class DownloadItem(QObject): self._last_done = self.bytes_done self.speed_changed.emit(self.speed) + @pyqtSlot(int) + def on_error(self, code): + logger.debug("Error {} in download".format(code)) + class DownloadManager(QObject):