diff options
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/user_agent.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/service/pixelated/user_agent.py b/service/pixelated/user_agent.py index 8c7440b0..bee0035b 100644 --- a/service/pixelated/user_agent.py +++ b/service/pixelated/user_agent.py @@ -185,17 +185,20 @@ def start_user_agent(debug_enabled): def setup(): try: + default_config_path = os.path.join(os.environ['HOME'], '.pixelated') + parser = argparse.ArgumentParser(description='Pixelated user agent.') parser.add_argument('--debug', action='store_true', help='DEBUG mode.') parser.add_argument('--register', metavar='username', help='register user with name.') + parser.add_argument('-c', '--config', metavar='configfile', default=default_config_path, help='use specified config file. Default is ~/.pixelated.') args = parser.parse_args() debug_enabled = args.debug or os.environ.get('DEBUG', False) reactor_manager.start_reactor(logging=debug_enabled) crochet.setup() - app.config.from_pyfile(os.path.join(os.environ['HOME'], '.pixelated')) + app.config.from_pyfile(args.config) if args.register: register_new_user(args.register) |