Skip to content

Commit 49f2c18

Browse files
committed
Adding timeout as indicated in TODO, as the mentioned pull request is merged
1 parent 06edfc2 commit 49f2c18

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

astroquery/besancon/core.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,8 @@ def get_besancon_model_file(self, filename, verbose=True, timeout=5.0):
118118
sys.stdout.write(u"\r")
119119
sys.stdout.flush()
120120
try:
121-
# U = requests.get(url,timeout=timeout,stream=True) TODO:
122-
# add timeout= keyword to get_readable_fileobj (when PR
123-
# https://github.com/astropy/astropy/pull/1258 is merged)
124-
with commons.get_readable_fileobj(url, cache=True) as f:
121+
with commons.get_readable_fileobj(url, remote_timeout=timeout,
122+
cache=True) as f:
125123
results = f.read()
126124
break
127125
except URLError:

0 commit comments

Comments
 (0)