Make editing work

the deleted lines were wiping the temp file, and thus the entry you were
trying to edit
This commit is contained in:
William Minchin 2014-01-02 17:38:54 -07:00
parent 419b2cb1a8
commit dd58becad2

View file

@ -129,8 +129,6 @@ def get_text_from_editor(config, template=""):
if template: if template:
with codecs.open(tmpfile, 'w', "utf-8") as f: with codecs.open(tmpfile, 'w', "utf-8") as f:
f.write(template) f.write(template)
with open(tmpfile, 'w'):
pass
subprocess.call(config['editor'].split() + [tmpfile]) subprocess.call(config['editor'].split() + [tmpfile])
with codecs.open(tmpfile, "r", "utf-8") as f: with codecs.open(tmpfile, "r", "utf-8") as f:
raw = f.read() raw = f.read()