Skip to content

Commit a4619eb

Browse files
authored
Merge pull request #2170 from bsipocz/astropy_lt_4_cleanup
MNT: minor cleanup for astropy <4.0
2 parents 840edf1 + 8f6b236 commit a4619eb

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

astroquery/utils/commons.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,9 @@ def FK4CoordGenerator(*args, **kwargs):
5151
'TableList',
5252
'suppress_vo_warnings',
5353
'validate_email',
54-
'ASTROPY_LT_4_0',
5554
'ASTROPY_LT_4_1',
5655
'ASTROPY_LT_4_3']
5756

58-
ASTROPY_LT_4_0 = not minversion('astropy', '4.0')
5957
ASTROPY_LT_4_1 = not minversion('astropy', '4.1')
6058
ASTROPY_LT_4_3 = not minversion('astropy', '4.3')
6159

@@ -397,14 +395,7 @@ def save_fits(self, savepath, link_cache='hard'):
397395
self.get_fits()
398396
target_key = str(self._target)
399397

400-
# There has been some internal refactoring in astropy.utils.data
401-
# so we do this check. Update when minimum required astropy changes.
402-
if ASTROPY_LT_4_0:
403-
if not aud.is_url_in_cache(target_key):
404-
raise IOError("Cached file not found / does not exist.")
405-
target = aud.download_file(target_key, cache=True)
406-
else:
407-
target = aud.download_file(target_key, cache=True, sources=[])
398+
target = aud.download_file(target_key, cache=True, sources=[])
408399

409400
if link_cache == 'hard':
410401
try:

0 commit comments

Comments
 (0)