diff options
author | Lars Wirzenius <liw@liw.fi> | 2009-12-03 17:16:01 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2009-12-03 17:16:01 +0200 |
commit | e48755d4175724db4077610319374674b854c32d (patch) | |
tree | 49c61c7c025278c55699f12d804b9f7f2db32a90 | |
parent | e4da16f64fbd081de70cb9b7ebee6176a402a91b (diff) | |
download | obnam-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.
-rwxr-xr-x | obnam | 2 | ||||
-rw-r--r-- | obnamlib/app.py | 1 |
2 files changed, 3 insertions, 0 deletions
@@ -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()) diff --git a/obnamlib/app.py b/obnamlib/app.py index 76b60daa..a7222ca9 100644 --- a/obnamlib/app.py +++ b/obnamlib/app.py @@ -30,6 +30,7 @@ class App(object): self.config = obnamlib.Configuration([]) self.config.new_string(['log'], 'name of log file') self.config.log = 'obnam.log' + self.config.new_string(['store'], 'name of backup store') self.pm = obnamlib.PluginManager() self.pm.locations = [self.plugins_dir()] |