summaryrefslogtreecommitdiff
path: root/obnam
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2009-12-03 17:16:01 +0200
committerLars Wirzenius <liw@liw.fi>2009-12-03 17:16:01 +0200
commite48755d4175724db4077610319374674b854c32d (patch)
tree49c61c7c025278c55699f12d804b9f7f2db32a90 /obnam
parente4da16f64fbd081de70cb9b7ebee6176a402a91b (diff)
downloadobnam-e48755d4175724db4077610319374674b854c32d.tar.gz
Added --store option.
When using --help, the option parser exits the process. Changed the main program to not print the SystemExit exception in this case, just calling sys.exit instead, with the appropriate exit code.
Diffstat (limited to 'obnam')
-rwxr-xr-xobnam2
1 files changed, 2 insertions, 0 deletions
diff --git a/obnam b/obnam
index aaf5b23f..c8845fc7 100755
--- a/obnam
+++ b/obnam
@@ -26,6 +26,8 @@ except obnamlib.AppException, e:
logging.critical(str(e))
sys.stderr.write('Error: %s\n' % str(e))
sys.exit(1)
+except SystemExit, e:
+ sys.exit(e.code)
except BaseException, e:
logging.critical(traceback.format_exc())
sys.stderr.write(traceback.format_exc())