Skip to content

Commit 24e3b6c

Browse files
volodymyrssbsipocz
authored andcommitted
add ASTROPY_LT_5_1 check that will fail
1 parent 2087b0c commit 24e3b6c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

astroquery/heasarc/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818

1919
def Table_read(*args, **kwargs):
2020
# why does if commons.ASTROPY_LT_5_0 not work on Windows?
21-
try:
22-
return Table.read(*args, **kwargs, unit_parse_strict='silent')
23-
except TypeError:
21+
if commons.ASTROPY_LT_5_1:
2422
return Table.read(*args, **kwargs)
23+
else:
24+
return Table.read(*args, **kwargs, unit_parse_strict='silent')
2525

2626

2727
@async_to_sync

astroquery/utils/commons.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,13 @@ def FK4CoordGenerator(*args, **kwargs):
5353
'validate_email',
5454
'ASTROPY_LT_4_1',
5555
'ASTROPY_LT_4_3',
56-
'ASTROPY_LT_5_0']
56+
'ASTROPY_LT_5_0',
57+
'ASTROPY_LT_5_1']
5758

5859
ASTROPY_LT_4_1 = not minversion('astropy', '4.1')
5960
ASTROPY_LT_4_3 = not minversion('astropy', '4.3')
6061
ASTROPY_LT_5_0 = not minversion('astropy', '5.0')
62+
ASTROPY_LT_5_1 = not minversion('astropy', '5.1')
6163

6264

6365
@deprecated('0.4.4', alternative='astroquery.query.BaseQuery._request')

0 commit comments

Comments
 (0)