Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simone Rossi
main
Commits
eb074ab1
Commit
eb074ab1
authored
Oct 23, 2017
by
Daniele Venzano
Browse files
Do not emit any output if there no executions to list (simplifies scripting)
parent
7dc288c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
zoe_cmd/entrypoint.py
View file @
eb074ab1
...
...
@@ -106,6 +106,8 @@ def exec_list_cmd(auth, args):
if
key
in
filter_names
:
filters
[
key
]
=
value
data
=
exec_api
.
list
(
**
filters
)
if
len
(
data
)
==
0
:
return
tabular_data
=
[[
e
[
'id'
],
e
[
'name'
],
e
[
'user_id'
],
e
[
'status'
]]
for
e
in
sorted
(
data
.
values
(),
key
=
lambda
x
:
x
[
'id'
])]
headers
=
[
'ID'
,
'Name'
,
'User ID'
,
'Status'
]
print
(
tabulate
(
tabular_data
,
headers
))
...
...
zoe_cmd/entrypoint_admin.py
View file @
eb074ab1
...
...
@@ -77,6 +77,8 @@ def exec_list_cmd(auth, args):
if
key
in
filter_names
:
filters
[
key
]
=
value
data
=
exec_api
.
list
(
**
filters
)
if
len
(
data
)
==
0
:
return
tabular_data
=
[[
e
[
'id'
],
e
[
'name'
],
e
[
'user_id'
],
e
[
'status'
]]
for
e
in
sorted
(
data
.
values
(),
key
=
lambda
x
:
x
[
'id'
])]
headers
=
[
'ID'
,
'Name'
,
'User ID'
,
'Status'
]
print
(
tabulate
(
tabular_data
,
headers
))
...
...
Write
Preview
Markdown
is supported
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