| -rw-r--r-- | raw_post | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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: |
