chiark / gitweb /
process putatives: Add many log_debug_config calls
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 24 Apr 2017 12:22:36 +0000 (13:22 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 24 Apr 2017 12:22:36 +0000 (13:22 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
hippotatlib/__init__.py

index 19a6aef..bd5d2c3 100644 (file)
@@ -390,12 +390,16 @@ def _cfg_process_putatives():
         server_pat + r' ' + '(?:' + client_pat + '|LIMIT)')
 
   for cs in cfg.sections():
+    log_debug_config('putatives: section [%s]...' % (cs))
+
     def log_ignore(why):
+      log_debug_config('putatives: section [%s] X ignore: %s' % (cs, why))
       print('warning: ignoring config section [%s] (%s)' % (cs, why),
             file=sys.stderr)
 
     if cs == 'LIMIT' or cs == 'COMMON':
       # plan A "[LIMIT]" or "[COMMON]"
+      log_debug_config('putatives: section [%s] A ignore' % (cs))
       continue
 
     try:
@@ -405,6 +409,7 @@ def _cfg_process_putatives():
 
       if server_re.fullmatch(cs):
         # plan C "[<servername>]"
+        log_debug_config('putatives: section [%s] C <server>' % (cs))
         putative(servers, cs, cs)
         continue
 
@@ -414,6 +419,7 @@ def _cfg_process_putatives():
 
         if pcs == 'LIMIT':
           # plan E "[<servername> LIMIT]"
+          log_debug_config('putatives: section [%s] E <server> LIMIT' % (cs))
           continue
 
         try:
@@ -425,13 +431,16 @@ def _cfg_process_putatives():
           continue
 
         else: # no AddressValueError
-          # plan D "[<servername> <client]" part 3
+          # plan D "[<servername> <client>]" part 3
+          log_debug_config('putatives: section [%s] D <server> <client>'
+                           % (cs))
           putative(clients, ci, pcs)
           putative(servers, pss, pss)
           continue
 
     else: # no AddressValueError
       # plan B "[<client>" part 2
+      log_debug_config('putatives: section [%s] B <client>' % (cs))
       putative(clients, ci, cs)
       continue