From 4414e292262436c654f810816e9812cba36704be Mon Sep 17 00:00:00 2001 From: "James D. Amberger" Date: Tue, 14 Aug 2018 06:16:10 -0400 Subject: [PATCH] Use shlex to parse editor commandline as per 2.0-rc1 --- jrnl/util.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jrnl/util.py b/jrnl/util.py index f6a7735f..2cf54057 100644 --- a/jrnl/util.py +++ b/jrnl/util.py @@ -163,7 +163,10 @@ def get_text_from_editor(config, template=""): with codecs.open(tmpfile, 'w', "utf-8") as f: if template: f.write(template) - subprocess.call(shlex.split(config['editor'], posix="win" not in sys.platform) + [tmpfile]) + try: + subprocess.call(shlex.split(config['editor'], posix="win" not in sys.platform) + [tmpfile]) + except AttributeError: + subprocess.call(config['editor'] + [tmpfile]) with codecs.open(tmpfile, "r", "utf-8") as f: raw = f.read() os.close(filehandle)