lib.App: Log reason for skipped completion
The shell completion setup in __run() catches every exception and silently ignores it. If argcomplete is missing or its initialization fails, the completion is simply not available and there is no trace of why, even when logging is turned up to debug level. Log the reason at debug level: one message when the argcomplete import fails and one with the exception for any other failure. Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.84.2 Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
d8ed0c95d3
commit
32d46df18d
1 changed files with 4 additions and 2 deletions
|
|
@ -284,8 +284,10 @@ class App: # export
|
|||
|
||||
argcomplete.autocomplete(self.__parser, default_completer = NoopCompleter())
|
||||
|
||||
except Exception:
|
||||
pass
|
||||
except ImportError:
|
||||
log(DEBUG, 'argcomplete is not installed, shell completion disabled')
|
||||
except Exception as e:
|
||||
log(DEBUG, f'Shell completion disabled: {e}')
|
||||
|
||||
self.__args = self.__parser.parse_args(args = argv)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue