Skip to content

Commit 814a9ee

Browse files
committed
can't use those sanity checks b/c they break cycle 0 data
1 parent 55a0be3 commit 814a9ee

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

astroquery/alma/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -892,10 +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['de_type'] == 'MOUS':
896-
# sanity checks: if this fails, the parser will
897-
assert entry['file_name'] != 'null'
898-
assert entry['file_key'] != 'null'
895+
is_file = (entry['de_type'] == 'MOUS'
896+
or (entry['file_name'] != 'null'
897+
and entry['file_key'] != 'null'))
898+
if is_file:
899899
# "de_name": "ALMA+uid://A001/X122/X35e",
900900
columns['uid'].append(entry['de_name'][5:])
901901
columns['size'].append((int(entry['file_size'])*u.B).to(u.Gbyte))

astroquery/query.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ def _download_file(self, url, local_filepath, timeout=None, auth=None, cache=Fal
197197
statinfo.st_size,
198198
length))
199199
else:
200+
log.info("Found cached file {0} with expected size {1}."
201+
.format(local_filepath, statinfo.st_size))
200202
response.close()
201203
return
202204
else:

0 commit comments

Comments
 (0)