Skip to content

Commit

Permalink
MAINT: fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
bsipocz committed Apr 29, 2024
1 parent 99cfcc9 commit 2a3aaca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion astroquery/utils/commons.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def parse_coordinates(coordinates):
"appropriate astropy.coordinates object.", InputWarning)
raise u.UnitsError
except ValueError as err:
if isinstance(err.args[1], u.UnitsError):
if isinstance(err.__context__, u.UnitsError):
try:
c = SkyCoord(coordinates, unit="deg", frame="icrs")
warnings.warn("Coordinate string is being interpreted as an "
Expand Down

0 comments on commit 2a3aaca

Please sign in to comment.