snap-tool: exit non-zero if problem occurred

snap-tool-base-none
Tobias Koch 6 years ago
parent d8962ee22f
commit 3cebce2fb9

8
debian/changelog vendored

@ -1,3 +1,11 @@
livecd-rootfs (2.568) UNRELEASED; urgency=medium
[ Tobias Koch ]
* Make sure snap-tool exits with non-zero exit status, if a problem
occurred.
-- Tobias Koch <tobias.koch@canonical.com> Wed, 27 Feb 2019 10:16:46 +0100
livecd-rootfs (2.567) disco; urgency=medium livecd-rootfs (2.567) disco; urgency=medium
* Fix change to ignore ubiquity packages, it failed to mark anything * Fix change to ignore ubiquity packages, it failed to mark anything

@ -392,7 +392,8 @@ class SnapCli:
if __name__ == "__main__": if __name__ == "__main__":
try: try:
SnapCli()(sys.argv[1:]) rval = SnapCli()(sys.argv[1:])
except KeyboardInterrupt: except KeyboardInterrupt:
sys.stderr.write("snap-tool: caught keyboard interrupt, exiting.\n") sys.stderr.write("snap-tool: caught keyboard interrupt, exiting.\n")
sys.exit(EXIT_ERR) sys.exit(EXIT_ERR)
sys.exit(rval)

Loading…
Cancel
Save