Handling ConnectionResetError

This commit is contained in:
Samuel Clay 2021-02-25 20:04:24 -05:00
parent c36373de61
commit d54de1cd23
2 changed files with 3 additions and 2 deletions

View file

@ -1,6 +1,7 @@
{
"service": {
"name": "{{ item.service_name }}",
"name": "{{ inventory_hostname|regex_replace('\d+', '') }}",
"id": "{{ inventory_hostname }}",
"tags": [
"celery_task"
]

View file

@ -168,7 +168,7 @@ class FetchFeed:
agent=self.feed.user_agent,
etag=etag,
modified=modified)
except (TypeError, ValueError, KeyError, EOFError, MemoryError, urllib.error.URLError) as e:
except (TypeError, ValueError, KeyError, EOFError, MemoryError, urllib.error.URLError, ConnectionResetError) as e:
logging.debug(' ***> [%-30s] ~FRFeed fetch error: %s' %
(self.feed.log_title[:30], e))
pass