Skip to content

Commit

Permalink
Merge pull request #313 from pyutils/splendid-main
Browse files Browse the repository at this point in the history
Splendid main
  • Loading branch information
Erotemic authored Jan 18, 2025
2 parents dad8aad + 7a06b2c commit 8794817
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Changes

4.2.1
~~~~~
* FIX: win32 encoding issues

4.2.0
~~~~~
Expand Down
4 changes: 2 additions & 2 deletions line_profiler/explicit_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,15 +360,15 @@ def show(self):

if write_text:
txt_output_fpath1 = pathlib.Path(f'{self.output_prefix}.txt')
txt_output_fpath1.write_text(raw_text)
txt_output_fpath1.write_text(raw_text, encoding='utf-8')
print('Wrote profile results to %s' % txt_output_fpath1)

if write_timestamped_text:
from datetime import datetime as datetime_cls
now = datetime_cls.now()
timestamp = now.strftime('%Y-%m-%dT%H%M%S')
txt_output_fpath2 = pathlib.Path(f'{self.output_prefix}_{timestamp}.txt')
txt_output_fpath2.write_text(raw_text)
txt_output_fpath2.write_text(raw_text, encoding='utf-8')
print('Wrote profile results to %s' % txt_output_fpath2)

if write_lprof:
Expand Down

0 comments on commit 8794817

Please sign in to comment.