From 1cc6968f38db0ade45242e08f9aab1b1db3e43b1 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 5 Apr 2017 14:01:02 +0100 Subject: [PATCH] pass opts to process_cfg Signed-off-by: Ian Jackson --- hippotat | 2 +- hippotatd | 5 ++++- hippotatlib/__init__.py | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hippotat b/hippotat index 82e1bee..3b25bfd 100755 --- a/hippotat +++ b/hippotat @@ -233,7 +233,7 @@ class Client(): clients = [ ] -def process_cfg(putative_servers, putative_clients): +def process_cfg(_opts, putative_servers, putative_clients): global clients for ss in putative_servers.values(): diff --git a/hippotatd b/hippotatd index aefa458..ec47c1d 100755 --- a/hippotatd +++ b/hippotatd @@ -286,7 +286,10 @@ def start_http(): #---------- config and setup ---------- -def process_cfg(putative_servers, putative_clients): +def process_cfg(_opts, putative_servers, putative_clients): + global opts + opts = _opts + global c c = ConfigResults() c.server = cfg.get('SERVER','server') diff --git a/hippotatlib/__init__.py b/hippotatlib/__init__.py index 8a26bee..701a5f2 100644 --- a/hippotatlib/__init__.py +++ b/hippotatlib/__init__.py @@ -634,7 +634,7 @@ just `+': all DFLAGs. try: (pss, pcs) = _cfg_process_putatives() - process_cfg(pss, pcs) + process_cfg(opts, pss, pcs) except (configparser.Error, ValueError): traceback.print_exc(file=sys.stderr) print('\nInvalid configuration, giving up.', file=sys.stderr) -- 2.11.0