Commit cf3171c2 authored by Jacek Sowiński's avatar Jacek Sowiński

Use six.text_type instead of str while saving to temp file in EditCommand

parent d606d862
...@@ -18,7 +18,7 @@ import os ...@@ -18,7 +18,7 @@ import os
from subprocess import call, check_call, CalledProcessError from subprocess import call, check_call, CalledProcessError
import tempfile import tempfile
from six import u from six import text_type, u
from topydo.commands.ListCommand import ListCommand from topydo.commands.ListCommand import ListCommand
from topydo.lib.MultiCommand import MultiCommand from topydo.lib.MultiCommand import MultiCommand
...@@ -52,7 +52,7 @@ class EditCommand(MultiCommand, ListCommand): ...@@ -52,7 +52,7 @@ class EditCommand(MultiCommand, ListCommand):
def _todos_to_temp(self): def _todos_to_temp(self):
f = tempfile.NamedTemporaryFile() f = tempfile.NamedTemporaryFile()
for todo in self.todos: for todo in self.todos:
f.write((str(todo) + "\n").encode('utf-8')) f.write((text_type(todo) + "\n").encode('utf-8'))
f.seek(0) f.seek(0)
return f return f
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment