Skip to content

Commit 9acf981

Browse files
committed
cli: use logger.exception() without exc
Address G201 by using `logger.exception()` instead of `logger.error(..., exc_info=True)` Address G200 by not formatting the exception into the message. Signed-off-by: Kevin Locke <[email protected]>
1 parent d3d1093 commit 9acf981

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/packagename/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ def exit_method(code: int = 0) -> None:
130130
try:
131131
# Do stuff here
132132
pass
133-
except Exception as exc: # pylint: disable=broad-except
134-
_logger.error('Unhandled Error: %s', exc, exc_info=True)
133+
except Exception: # pylint: disable=broad-except
134+
_logger.exception('Unhandled Error')
135135
return 1
136136

137137
return 0

0 commit comments

Comments
 (0)