Skip to content

Commit

Permalink
Do not error out when receiving QNetworkReply two times
Browse files Browse the repository at this point in the history
  • Loading branch information
EvaSDK committed Jan 6, 2017
1 parent ddea4b3 commit ef329f1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ghost/ghost.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,13 @@ def createRequest(self, operation, request, data):
def _reply_finished_callback(self, reply):
"""Unregister a complete QNetworkReply."""
self.logger.debug('Reply for %s complete', reply.url().toString())
self._registry.pop(id(reply))
try:
self._registry.pop(id(reply), None)
except KeyError:
# Workaround for QtWebkit bug #82506
# https://bugs.webkit.org/show_bug.cgi?format=multiple&id=82506
self.logger.debug('Reply was not in registry,'
'maybe webkit bug #82506')

@property
def requests(self):
Expand Down

0 comments on commit ef329f1

Please sign in to comment.