Download:
child 342:ef5986aad0ff
parent 340:2d97d5a9d437
341:0d7987defa1a
Anton Shestakov <av6@dwimlabs.net>, Wed, 30 May 2018 20:46:17 +0800
queue: don't set ETag to None if it's not in response headers

1 файлов изменено, 2 вставок(+), 1 удалений(-) [+]
poller-queue.py file | annotate | diff | comparison | revisions
--- a/poller-queue.py Wed May 30 18:26:26 2018 +0800
+++ b/poller-queue.py Wed May 30 20:46:17 2018 +0800
@@ -70,7 +70,8 @@
elif target['type'] == 'github':
self.parse_github(target, data)
- target['etag'] = response.headers.get('ETag', None)
+ if 'ETag' in response.headers:
+ target['etag'] = response.headers['ETag']
elif response.code == 304:
logging.debug('Not modified: %s', target['poll'])
else: