handle more/better browsing timeouts

This commit is contained in:
Barbara Miller 2019-10-04 17:40:01 -07:00
parent 4fc7b612a5
commit faf176793d
2 changed files with 4 additions and 2 deletions

View File

@ -612,9 +612,9 @@ class Browser:
self._wait_for(
lambda: self.websock_thread.received_result(msg_id),
timeout=timeout)
except brozzler.browser.BrowsingTimeout:
except brozzler.browser.BrowsingTimeout as e:
self.logger.error(
'time out trying to extract tertiary assets')
'browsing timeout extracting tertiary assets: %s', e)
return frozenset()
message = self.websock_thread.pop_result(msg_id)
if ('result' in message and 'result' in message['result']

View File

@ -408,6 +408,8 @@ class BrozzlerWorker:
# same proxy again next time
logging.error(
'proxy error (self._proxy=%r)', self._proxy, exc_info=1)
except brozzler.browser.BrowsingTimeout as e:
self.logger.error('browsing timeout error: %s', e)
except:
self.logger.critical("unexpected exception", exc_info=True)
finally: