Skip to content

Commit

Permalink
try a fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Erotemic committed Sep 24, 2024
1 parent 8c5a4dd commit 21ade47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions line_profiler/line_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,10 @@ def show_func(filename, start_lineno, func_name, timings, unit,
txt = template % (lineno, nhits, time, per_hit, percent, line_)
try:
stream.write(txt)
except UnicodeEncodeError as ex:
except UnicodeEncodeError:
# todo: better handling of windows encoding issue
# for now just work around it
line_ = f'{ex!r} - help wanted for a fix'
line_ = 'UnicodeEncodeError - help wanted for a fix'
txt = template % (lineno, nhits, time, per_hit, percent, line_)
stream.write(txt)

Expand Down

0 comments on commit 21ade47

Please sign in to comment.