Skip to content

Commit

Permalink
use logger for exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
ikamensh committed Jun 17, 2023
1 parent 6c3448e commit 5d29ba1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/flynt/transform/format_call_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from flynt.exceptions import ConversionRefused, FlyntException
from flynt.utils import ast_formatted_value, ast_string_node


stdlib_parse = string.Formatter().parse


Expand Down
4 changes: 2 additions & 2 deletions src/flynt/transform/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def transform_chunk(
state.invalid_conversions += 1
return code, False
except Exception:
traceback.print_exc()
log.exception("Exception during conversion of code '%s'", code)
msg = traceback.format_exc()
log.exception("Exception during conversion of code '%s': %s", code, msg)
state.invalid_conversions += 1
return code, False
else:
Expand Down

0 comments on commit 5d29ba1

Please sign in to comment.