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