Commit 92489d1f authored by Bram Schoenmakers's avatar Bram Schoenmakers

Merge pull request #13 from mruwek/fix-unset-EDITOR

topydo edit won't work if EDITOR is unset
parents 0e4557e0 08a6f743
......@@ -29,7 +29,10 @@ class EditCommand(Command):
if not super(EditCommand, self).execute():
return False
editor = os.environ['EDITOR'] or 'vi'
try:
editor = os.environ['EDITOR'] or 'vi'
except(KeyError):
editor = 'vi'
todo = config().todotxt()
return call([editor, todo]) == 0
......
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