From 14503786d1ff3a91cee1b05698faf60e1f7bb371 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Sun, 18 Oct 2015 19:33:57 -0700 Subject: Remove file after using it --- edit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/edit.py b/edit.py index 42f966f..40c3653 100644 --- a/edit.py +++ b/edit.py @@ -21,6 +21,7 @@ def edit(data, buf, args): cmd = [editor, path] code = subprocess.Popen(cmd).wait() if code != 0: + os.remove(path) weechat.command(buf, "/window refresh") return weechat.WEECHAT_RC_ERROR @@ -29,6 +30,7 @@ def edit(data, buf, args): weechat.buffer_set(buf, "input", text) weechat.buffer_set(buf, "input_pos", str(len(text))) + os.remove(path) weechat.command(buf, "/window refresh") return weechat.WEECHAT_RC_OK -- cgit v1.2.3-70-g09d2