Commit 2965e2aa authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Merge branch 'v0.5.0-markus' of gitlab.mpcdf.mpg.de:nomad-lab/nomad-FAIR into v0.5.0-markus

parents 3ccd109f c940d589
Pipeline #53449 canceled with stages
in 6 minutes and 12 seconds
...@@ -97,7 +97,7 @@ def mirror( ...@@ -97,7 +97,7 @@ def mirror(
print('Cannot parse the given query %s: %s' % (query, str(e))) print('Cannot parse the given query %s: %s' % (query, str(e)))
sys.exit(1) sys.exit(1)
else: else:
query = {} query = dict(published=True)
utils.configure_logging() utils.configure_logging()
...@@ -123,9 +123,14 @@ def mirror( ...@@ -123,9 +123,14 @@ def mirror(
continue continue
except KeyError: except KeyError:
pass pass
upload_data = client.mirror.get_upload_mirror(upload_id=upload_id).response().result try:
n_calcs = len(upload_data.calcs) upload_data = client.mirror.get_upload_mirror(upload_id=upload_id).response().result
n_calcs = len(upload_data.calcs)
except HTTPBadRequest:
print('Could not mirror %s, it is probably not published.' % upload_id)
n_calcs = 0
continue
if __in_test: if __in_test:
# In tests, we mirror from our selves, remove it so it is not there for import # In tests, we mirror from our selves, remove it so it is not there for import
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment