Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
d157dc78
Commit
d157dc78
authored
Aug 08, 2019
by
Markus Scheidgen
Browse files
Fixed non published uploads handling in mirror cli command. [skip ci]
parent
66f7e3a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
nomad/cli/client/mirror.py
View file @
d157dc78
...
...
@@ -97,7 +97,7 @@ def mirror(
print
(
'Cannot parse the given query %s: %s'
%
(
query
,
str
(
e
)))
sys
.
exit
(
1
)
else
:
query
=
{}
query
=
dict
(
published
=
True
)
utils
.
configure_logging
()
...
...
@@ -123,9 +123,14 @@ def mirror(
continue
except
KeyError
:
pass
upload_data
=
client
.
mirror
.
get_upload_mirror
(
upload_id
=
upload_id
).
response
().
result
n_calcs
=
len
(
upload_data
.
calcs
)
try
:
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
:
# In tests, we mirror from our selves, remove it so it is not there for import
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment