From 7a29ec5e105bfcee600016a2e2a54211a5d094e6 Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Tue, 12 Feb 2019 17:32:11 -0800 Subject: [PATCH] Check if filename is '' instead of None if fzf is cancelled --- fedit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fedit.py b/fedit.py index 866ae9d..bdfb997 100644 --- a/fedit.py +++ b/fedit.py @@ -115,10 +115,10 @@ fzf_output = subprocess.run([FZF_CMD] + FZF_OPTS, input=files.stdout, stdout=subprocess.PIPE).stdout -# filename is null terminated +# Filename is null terminated filename = fzf_output.decode(LOCALE).strip('\x00') -if filename is not None: +if not filename == '': cmd = gen_editor_cmd(filename.strip('\n')) subprocess.run(cmd) else: