chiark / gitweb /
Revert "config: Check args after reading config"
[hippotat.git] / hippotatlib / __init__.py
index 7bdf4ea8e1730e49150933f56e08716c3424c3c0..e8a502f8a35b88b9ea616e7dce6c0089a5e55401 100644 (file)
@@ -562,6 +562,11 @@ def common_startup(process_cfg):
     need_defcfg = False
     readconfig(value)
 
+  def read_defconfig():
+    readconfig('/etc/hippotat/config.d', False)
+    readconfig('/etc/hippotat/passwords.d', False)
+    readconfig('/etc/hippotat/master.cfg',   False)
+
   def dfs_less_detailed(dl):
     return [df for df in DBG.iterconstants() if df <= dl]
 
@@ -629,8 +634,7 @@ just `+': all DFLAGs.
   if len(args): optparser.error('no non-option arguments please')
 
   if need_defcfg:
-    readconfig('/etc/hippotat/config',   False)
-    readconfig('/etc/hippotat/config.d', False)
+    read_defconfig()
 
   try:
     (pss, pcs) = _cfg_process_putatives()
@@ -662,4 +666,4 @@ just `+': all DFLAGs.
 def common_run():
   log_debug(DBG.INIT, 'entering reactor')
   if not _crashing: reactor.run()
-  print('CRASHED (end)', file=sys.stderr)
+  print('ENDED', file=sys.stderr)