Add a stop-gap solution for AssertionError when retrying downloads
See #3847
This commit is contained in:
parent
2b6b4e82a7
commit
979b7cfaba
@ -90,6 +90,7 @@ Fixed
|
||||
- `@match` in Greasemonkey scripts now more closely matches the proper pattern
|
||||
syntax.
|
||||
- Searching via `/` or `?` now doesn't handle any characters in a special way.
|
||||
- Fixed crash when trying to retry some failed downloads on QtWebEngine.
|
||||
|
||||
v1.2.1
|
||||
------
|
||||
|
@ -101,7 +101,11 @@ class DownloadItem(downloads.AbstractDownloadItem):
|
||||
|
||||
def retry(self):
|
||||
state = self._qt_item.state()
|
||||
assert state == QWebEngineDownloadItem.DownloadInterrupted, 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()
|
||||
|
Loading…
Reference in New Issue
Block a user