Skip to content

Commit 5b3bdbf

Browse files
eerovahernamurphy
authored andcommitted
Make VOTable unit format version-dependent astropy#10791
1 parent f556223 commit 5b3bdbf

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎astropy/io/votable/tree.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,12 @@ def _get_default_unit_format(config):
166166
"""
167167
Get the default unit format as specified in the VOTable spec.
168168
"""
169-
# In the future, this should take into account the VOTable
170-
# version.
171-
return 'cds'
169+
# The unit format changed between VOTable versions 1.3 and 1.4,
170+
# see issue #10791.
171+
if config['version_1_4_or_later']:
172+
return 'vounit'
173+
else:
174+
return 'cds'
172175

173176

174177
def _get_unit_format(config):

0 commit comments

Comments
 (0)