Skip to content

Commit cf53770

Browse files
mhsarmientojespinosaar
authored andcommitted
This new commit solves the issue with the use of the exception
gzip.BadGzipFile with python 3.7. Now except OSError is being used as a workaround
1 parent 1c0fb80 commit cf53770

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

astroquery/utils/tap/xmlparser/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def read_http_response(response, output_format, correct_units=True):
3232

3333
try:
3434
result = APTable.read(io.BytesIO(gzip.decompress(data.read())), format=astropy_format)
35-
except gzip.BadGzipFile:
35+
except OSError:
3636
# data is not a valid gzip file by BadGzipFile.
3737
result = APTable.read(data, format=astropy_format)
3838
pass

0 commit comments

Comments
 (0)