mirror of
https://github.com/fergalmoran/picard.git
synced 2025-12-22 09:18:18 +00:00
Merge pull request #2507 from zas/fix_image_dl
PICARD-2919: fix download of GIF images (and maybe others)
This commit is contained in:
@@ -558,12 +558,13 @@ class WebService(QtCore.QObject):
|
|||||||
log.debug("Response received: %s", document)
|
log.debug("Response received: %s", document)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.error("Unable to parse the response for %s -> %s", display_reply_url, e)
|
log.error("Unable to parse the response for %s -> %s", display_reply_url, e)
|
||||||
document = reply.readAll()
|
document = bytes(reply.readAll())
|
||||||
error = e
|
error = e
|
||||||
finally:
|
finally:
|
||||||
handler(document, reply, error)
|
handler(document, reply, error)
|
||||||
else:
|
else:
|
||||||
handler(reply.readAll(), reply, error)
|
# readAll() returns QtCore.QByteArray, so convert to bytes
|
||||||
|
handler(bytes(reply.readAll()), reply, error)
|
||||||
|
|
||||||
ratecontrol.adjust(hostkey, slow_down)
|
ratecontrol.adjust(hostkey, slow_down)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user