Skip to content

Commit 55a0be3

Browse files
committed
add some internal sanity checks
1 parent 63e326e commit 55a0be3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

astroquery/alma/core.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,10 @@ def _json_summary_to_table(self, data, base_url):
892892
"""
893893
columns = {'uid':[], 'URL':[], 'size':[]}
894894
for entry in data['node_data']:
895-
if entry['file_name'] != 'null':
895+
if entry['de_type'] == 'MOUS':
896+
# sanity checks: if this fails, the parser will
897+
assert entry['file_name'] != 'null'
898+
assert entry['file_key'] != 'null'
896899
# "de_name": "ALMA+uid://A001/X122/X35e",
897900
columns['uid'].append(entry['de_name'][5:])
898901
columns['size'].append((int(entry['file_size'])*u.B).to(u.Gbyte))

0 commit comments

Comments
 (0)