From fab3edc45a9b829641f614b0b6aaeebbd77bca03 Mon Sep 17 00:00:00 2001 From: Thomas Kuschel Date: Mon, 17 Jun 2024 20:01:16 +0200 Subject: [PATCH] CHG verbose > 0 printing call found, using typo file, print typo file --- afu/callbook.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/afu/callbook.py b/afu/callbook.py index 7d9dcb5..f2aa79d 100755 --- a/afu/callbook.py +++ b/afu/callbook.py @@ -219,6 +219,11 @@ def fix_typo(call, fullname, verbose=1): if not fix_typo.lines: with open(path, 'r') as file: fix_typo.lines = file.readlines() + if verbose > 0: + print(f'File "{fixtypofile}":') + for line in fix_typo.lines: + print(f'>> {line.rstrip()}') + print('>> ** EOF **') for line in fix_typo.lines[4:]: # starting with line 4 if len(fix_typo.spaces) == 0: # not initialized @@ -228,7 +233,8 @@ def fix_typo(call, fullname, verbose=1): fix_typo.spaces = [line.index(words[1]), line.index(words[2]), line.index(words[3])] else: if call in line[2:8]: - print(f'Call: {call} found') + if verbose > 0: + print(f'Call: {call} found') match line[0]: case '#': if verbose > 1: