Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.cmdline
Commits
eae8b088
Commit
eae8b088
authored
May 23, 2018
by
Theophile GENTILHOMME
Browse files
[common] Add sys.exit(...)
Needed to get correct exit code from Click commands (otherwise always return 0)
parent
774429d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
beat/cmdline/common.py
View file @
eae8b088
...
...
@@ -1172,6 +1172,7 @@ def delete_local(prefix, type, names):
storage
.
remove
()
sys
.
exit
(
status
)
return
status
...
...
@@ -1217,7 +1218,7 @@ def delete_remote(webapi, type, names):
"reason: %s"
,
type
,
webapi
.
platform
,
webapi
.
user
,
six
.
moves
.
http_client
.
responses
[
status_code
])
status
+=
1
sys
.
exit
(
status
)
return
status
...
...
@@ -1294,7 +1295,7 @@ def status(webapi, prefix, type):
for
key
in
set
(
remote
.
keys
())
-
set
(
local
):
logger
.
extra
(
'[r] %s/%s (@%s)'
,
TYPE_PLURAL
[
type
],
key
,
remote
[
key
][
'creation_date'
])
sys
.
exit
(
0
)
return
0
,
retval
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment