Catch ConnectionResetError when making API request

Caught this traceback in the log when an update failed to complete. Also
added a generic Exception catch-all.
This commit is contained in:
Erik Johnson 2016-07-15 16:29:53 -05:00
parent 9c414154fb
commit 968c17a357

View File

@ -76,7 +76,7 @@ class ScoresBackend(SettingsBase):
exc.code, exc.reason, exc.url, exc.code, exc.reason, exc.url,
) )
return {} return {}
except URLError as exc: except (ConnectionResetError, URLError) as exc:
self.logger.critical('Error making request to %s: %s', url, exc) self.logger.critical('Error making request to %s: %s', url, exc)
return {} return {}