Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
Fixed issue with python3 opening a unicode file.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-lazar committed May 17, 2015
1 parent c232e1f commit 4f92844
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rtv/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def open_editor(data=''):
read and and lines starting with '#' will be stripped.
"""

with NamedTemporaryFile(prefix='rtv-', suffix='.txt', mode='w') as fp:
with NamedTemporaryFile(prefix='rtv-', suffix='.txt', mode='wb') as fp:
fp.write(clean(data))
fp.flush()
editor = os.getenv('RTV_EDITOR') or os.getenv('EDITOR') or 'nano'
Expand Down

0 comments on commit 4f92844

Please sign in to comment.