Esempio n. 1
0
    def retry(self):
        state = self._qt_item.state()
        assert state == QWebEngineDownloadItem.DownloadInterrupted, state

        try:
            self._qt_item.resume()
        except AttributeError:
            raise downloads.UnsupportedOperationError(
                "Retrying downloads is unsupported with QtWebEngine on "
                "Qt/PyQt < 5.10")
Esempio n. 2
0
    def retry(self):
        state = self._qt_item.state()
        if state != QWebEngineDownloadItem.DownloadInterrupted:
            log.downloads.warning(
                "Trying to retry download in state {}".format(
                    debug.qenum_key(QWebEngineDownloadItem, state)))
            return

        try:
            self._qt_item.resume()
        except AttributeError:
            raise downloads.UnsupportedOperationError(
                "Retrying downloads is unsupported with QtWebEngine on "
                "Qt/PyQt < 5.10")
Esempio n. 3
0
 def retry(self):
     # https://bugreports.qt.io/browse/QTBUG-56840
     raise downloads.UnsupportedOperationError(
         "Retrying downloads is unsupported with QtWebEngine")