Skip to content

Commit

Permalink
Increase timeout for CN Open Data download
Browse files Browse the repository at this point in the history
It seems that raw.githubusercontent.com can be extremely slow.
  • Loading branch information
arthurdejong committed Nov 13, 2022
1 parent 580d6e0 commit 5cdef0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions update/cn_loc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# update/cn_loc.py - script to fetch data from the CN Open Data community
#
# Copyright (C) 2014-2015 Jiangge Zhang
# Copyright (C) 2015-2019 Arthur de Jong
# Copyright (C) 2015-2022 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -58,7 +58,7 @@ def fetch_data():
"""Return the data from tab-separated revisions as one code/name dict."""
data_collection = OrderedDict()
for revision in data_revisions:
response = requests.get('%s/raw/release/%s.txt' % (data_url, revision), timeout=30)
response = requests.get('%s/raw/release/%s.txt' % (data_url, revision), timeout=120)
response.raise_for_status()
if response.ok:
print('%s is fetched' % revision, file=sys.stderr)
Expand Down

0 comments on commit 5cdef0d

Please sign in to comment.