Skip to content

Commit 6d3be24

Browse files
committed
fix bug with error handling
1 parent aae0a45 commit 6d3be24

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tardis_client/data_downloader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ async def _reliably_fetch_and_cache_slice(session, endpoint, exchange, from_date
114114

115115
if isinstance(ex, urllib.error.HTTPError):
116116
# do not retry when we've got bad or unauthorized request or enough attempts
117-
if (ex.code == 400 and 'ISO 8601 format' in ex.msg == False) or ex.code == 401:
117+
if (ex.code == 400 and 'ISO 8601 format' not in ex.msg) or ex.code == 401:
118118
raise ex
119119
if ex.code == 429:
120120
too_many_requests = True

0 commit comments

Comments
 (0)