Updated for logging exception

This commit is contained in:
Dimitris Zlatanidis 2023-04-27 09:53:56 +03:00
parent 191cb576e7
commit 43ccf008ec

View file

@ -825,9 +825,9 @@ def main() -> None:
try:
arguments[args[0]]()
except (KeyError, IndexError) as err:
except (KeyError, IndexError):
logger = logging.getLogger(__name__)
logger.info('%s: %s', main.__name__, err)
logger.exception('%s:', main.__name__)
usage.help_short(1)