From: Ian Jackson Date: Mon, 24 Apr 2017 12:26:00 +0000 (+0100) Subject: process putatives: Introduce dbg() X-Git-Tag: hippotat/1.0.0~55^2~20 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=hippotat.git;a=commitdiff_plain;h=3a8ed92d586a32264a76867ea36df76361131bec process putatives: Introduce dbg() No functional change. Signed-off-by: Ian Jackson --- diff --git a/hippotatlib/__init__.py b/hippotatlib/__init__.py index 0f59f0d..9b2c33d 100644 --- a/hippotatlib/__init__.py +++ b/hippotatlib/__init__.py @@ -390,16 +390,17 @@ def _cfg_process_putatives(): server_pat + r' ' + '(?:' + client_pat + '|LIMIT)') for cs in cfg.sections(): - log_debug_config('putatives: section [%s]...' % (cs)) + def dbg(m): + log_debug_config('putatives: section [%s] %s' % (cs, m)) def log_ignore(why): - log_debug_config('putatives: section [%s] X ignore: %s' % (cs, why)) + dbg('X ignore: %s' % (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)) + dbg('A ignore') continue try: @@ -409,7 +410,7 @@ def _cfg_process_putatives(): if server_re.fullmatch(cs): # plan C "[]" - log_debug_config('putatives: section [%s] C ' % (cs)) + dbg('C ') putative(servers, cs, cs) continue @@ -419,7 +420,7 @@ def _cfg_process_putatives(): if pcs == 'LIMIT': # plan E "[ LIMIT]" - log_debug_config('putatives: section [%s] E LIMIT' % (cs)) + dbg('E LIMIT') continue try: @@ -432,8 +433,7 @@ def _cfg_process_putatives(): else: # no AddressValueError # plan D "[ ]" part 3 - log_debug_config('putatives: section [%s] D ' - % (cs)) + dbg('D ') putative(clients, ci, pcs) putative(servers, pss, pss) continue @@ -443,7 +443,7 @@ def _cfg_process_putatives(): else: # no AddressValueError # plan B "[" part 2 - log_debug_config('putatives: section [%s] B ' % (cs)) + dbg('B ') putative(clients, ci, cs) continue