diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2018-11-24 10:13:09 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2018-11-24 12:59:25 +0100 |
commit | 38441dafb7f5dd6e558db0b4dbc1a4f1a90df162 (patch) | |
tree | ffe766ad84c8851975ed40a31c5affd38e542060 /crocoite | |
parent | a094f8e7b8fa8d5d29874e4f5c77208c52fc932d (diff) | |
download | crocoite-38441dafb7f5dd6e558db0b4dbc1a4f1a90df162.tar.gz crocoite-38441dafb7f5dd6e558db0b4dbc1a4f1a90df162.tar.bz2 crocoite-38441dafb7f5dd6e558db0b4dbc1a4f1a90df162.zip |
browser: Ignore load failures for nonexisting requests
Fixes None dereference.
Diffstat (limited to 'crocoite')
-rw-r--r-- | crocoite/browser.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crocoite/browser.py b/crocoite/browser.py index 93d9228..c472746 100644 --- a/crocoite/browser.py +++ b/crocoite/browser.py @@ -350,8 +350,9 @@ class SiteLoader: errorText=kwargs['errorText'], blockedReason=kwargs.get ('blockedReason')) item = self.requests.pop (reqId, None) - item.failed = True - return item + if item is not None: + item.failed = True + return item async def _entryAdded (self, **kwargs): """ Log entry added """ |