diff options
author | Tommi Virtanen <tv@eagain.net> | 2007-09-03 20:54:14 -0700 |
---|---|---|
committer | Tommi Virtanen <tv@eagain.net> | 2007-09-03 20:54:14 -0700 |
commit | 1dfe84754a1dce077b6228aab551275c34275ea0 (patch) | |
tree | 559ca2d323f6d462815fa3bd5da9e8866008c2cf /gitosis/init.py | |
parent | Created user get home from somewhere, let adduser create it. (diff) | |
download | gitosis-dakkar-1dfe84754a1dce077b6228aab551275c34275ea0.tar.gz gitosis-dakkar-1dfe84754a1dce077b6228aab551275c34275ea0.tar.bz2 gitosis-dakkar-1dfe84754a1dce077b6228aab551275c34275ea0.zip |
Make gitosis-init ignore error from non-existent config file.
Refactored config file reading and logging initialization to make
things nicer.
Diffstat (limited to 'gitosis/init.py')
-rw-r--r-- | gitosis/init.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gitosis/init.py b/gitosis/init.py index ba2e4c6..0da6ed3 100644 --- a/gitosis/init.py +++ b/gitosis/init.py @@ -123,6 +123,13 @@ class Main(app.App): 'Initialize a user account for use with gitosis') return parser + def read_config(self, *a, **kw): + # ignore errors that result from non-existent config file + try: + super(Main, self).read_config(*a, **kw) + except app.ConfigFileDoesNotExistError: + pass + def handle_args(self, parser, cfg, options, args): super(Main, self).handle_args(parser, cfg, options, args) |