@@ -191,7 +191,10 @@ def _old_w3query_fallback(self, content):
191
191
f .writeto (I )
192
192
I .seek (0 )
193
193
194
- return Table .read (I , unit_parse_strict = 'silent' )
194
+ if commons .ASTROPY_LT_5_0 :
195
+ return Table .read (I )
196
+ else :
197
+ return Table .read (I , unit_parse_strict = 'silent' )
195
198
196
199
def _fallback (self , text ):
197
200
"""
@@ -221,7 +224,11 @@ def _fallback(self, text):
221
224
new_table .append ("" .join (newline ))
222
225
223
226
data = StringIO (text .replace (old_table , "\n " .join (new_table )))
224
- return Table .read (data , hdu = 1 , unit_parse_strict = 'silent' )
227
+
228
+ if commons .ASTROPY_LT_5_0 :
229
+ return Table .read (data , hdu = 1 )
230
+ else :
231
+ return Table .read (data , hdu = 1 , unit_parse_strict = 'silent' )
225
232
226
233
def _parse_result (self , response , verbose = False ):
227
234
# if verbose is False then suppress any VOTable related warnings
@@ -242,8 +249,11 @@ def _parse_result(self, response, verbose=False):
242
249
243
250
try :
244
251
data = BytesIO (response .content )
245
- table = Table .read (data , hdu = 1 , unit_parse_strict = 'silent' )
246
- return table
252
+
253
+ if commons .ASTROPY_LT_5_0 :
254
+ return Table .read (data , hdu = 1 )
255
+ else :
256
+ return Table .read (data , hdu = 1 , unit_parse_strict = 'silent' )
247
257
except ValueError :
248
258
try :
249
259
return self ._fallback (response .text )
0 commit comments