Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nomad-FAIR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nomad-lab
nomad-FAIR
Commits
d157dc78
Commit
d157dc78
authored
5 years ago
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
Fixed non published uploads handling in mirror cli command. [skip ci]
parent
66f7e3a6
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!48
v0.5.0 Release
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nomad/cli/client/mirror.py
+9
-4
9 additions, 4 deletions
nomad/cli/client/mirror.py
with
9 additions
and
4 deletions
nomad/cli/client/mirror.py
+
9
−
4
View file @
d157dc78
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment