Still touch the tempfile before editing

This commit is contained in:
William Minchin 2014-01-02 18:05:10 -07:00
parent 3fadd6e933
commit 7e496bd51b

View file

@ -126,6 +126,8 @@ def load_and_fix_json(json_path):
def get_text_from_editor(config, template=""):
tmpfile = os.path.join(tempfile.gettempdir(), "jrnl")
with open(tmpfile, 'w'):
pass
if template:
with codecs.open(tmpfile, 'w', "utf-8") as f:
f.write(template)