From 66276d036e9321e7557e7105996f9b7770f036a9 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 29 Nov 2021 20:48:38 +0000 Subject: [PATCH] add username and password commandline opts to budget-sync --- src/budget_sync/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/budget_sync/main.py b/src/budget_sync/main.py index 258e0a5..c8929af 100644 --- a/src/budget_sync/main.py +++ b/src/budget_sync/main.py @@ -23,6 +23,8 @@ def main(): help="The path to the output directory, will be created if it " "doesn't exist", dest="output_dir", metavar="") + parser.add_argument('--username', help="Log in with this username") + parser.add_argument('--password', help="Log in with this password") args = parser.parse_args() try: with args.config as config_file: @@ -32,6 +34,9 @@ def main(): return logging.info("Using Bugzilla instance at %s", config.bugzilla_url) bz = Bugzilla(config.bugzilla_url) + if args.username: + logging.debug("logging in...") + bz.interactive_login(args.username, args.password) logging.debug("Connected to Bugzilla") budget_graph = BudgetGraph(all_bugs(bz), config) for error in budget_graph.get_errors(): -- 2.30.2