chiark / gitweb /
pass opts to process_cfg
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 5 Apr 2017 13:01:02 +0000 (14:01 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 5 Apr 2017 13:01:02 +0000 (14:01 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
hippotat
hippotatd
hippotatlib/__init__.py

index 82e1beea05bbb6148d21f65b145b8ed68dc50986..3b25bfdc77c6ad56f624ece432c0e40fb7f5529b 100755 (executable)
--- 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():
index aefa45890a9676b64fa59d2df0b3b229c35dd99a..ec47c1ddee4118218c24a6cdcb528279beb9463b 100755 (executable)
--- 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')
index 8a26bee283ee38e7a58c7ae37b9b9b27d9792890..701a5f20092520f6df510fb9f31bf734d4ffe923 100644 (file)
@@ -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)