summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--raw_post4
1 files changed, 3 insertions, 1 deletions
diff --git a/raw_post b/raw_post
index 63490c3..f26765c 100644
--- a/raw_post
+++ b/raw_post
@@ -65,9 +65,11 @@ else:
editor = os.environ["EDITOR"]
contents_path = os.path.join (repo, CONTENTS_FILE)
+ if os.path.exists (contents_path):
+ os.remove (contents_path)
ret = subprocess.call ([editor, contents_path])
- if ret == 0:
+ if ret == 0 and os.path.exists (contents_path):
contents = open (contents_path).read ()
os.remove (contents_path)
else: