Merge pull request #2507 from zas/fix_image_dl

PICARD-2919: fix download of GIF images (and maybe others)
This commit is contained in:
Laurent Monin
2024-06-01 19:16:08 +02:00
committed by GitHub

View File

@@ -558,12 +558,13 @@ class WebService(QtCore.QObject):
log.debug("Response received: %s", document)
except Exception as e:
log.error("Unable to parse the response for %s -> %s", display_reply_url, e)
document = reply.readAll()
document = bytes(reply.readAll())
error = e
finally:
handler(document, reply, error)
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)