Skip to content

Commit

Permalink
Manager bsc1171687 (uyuni-project#2234)
Browse files Browse the repository at this point in the history
* use defined return values for spacecmd methods so scripts can check for failure (bsc#1171687)

* use defined return values for spacecmd methods so scripts can check for failure (bsc#1171687)

* fix spacecmd tests

* fix spacecmd tests

* use defined return values for spacecmd methods so scripts can check for failure (bsc#1171687)

* fix typo

* fix spacecmd unit tests for defined return values
  • Loading branch information
mantel authored Jun 3, 2020
1 parent 9861958 commit 81d934e
Show file tree
Hide file tree
Showing 28 changed files with 1,253 additions and 490 deletions.
3 changes: 3 additions & 0 deletions spacecmd/spacecmd.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
- use defined return values for spacecmd methods so scripts can
check for failure (bsc#1171687)

-------------------------------------------------------------------
Mon Feb 17 12:39:00 CET 2020 - [email protected]

Expand Down
4 changes: 3 additions & 1 deletion spacecmd/src/bin/spacecmd
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ if __name__ == '__main__':
precmd = shell.precmd(command)
if precmd == '':
sys.exit(1)
shell.print_result(shell.onecmd(precmd), precmd)
result = shell.print_result(shell.onecmd(precmd), precmd)
if result != 0:
sys.exit(result)
except KeyboardInterrupt:
print
print('User Interrupt')
Expand Down
Loading

0 comments on commit 81d934e

Please sign in to comment.