| author | Guillaume Seguin <guillaume@segu.in> | 2010-07-22 00:39:57 (GMT) |
|---|---|---|
| committer | Guillaume Seguin <guillaume@segu.in> | 2010-07-22 00:39:57 (GMT) |
| commit | 9932febf8202b9d1b4a33ae7ff53e627ec01a2d3 (patch) (side-by-side diff) | |
| tree | 9aad0f618029b34d85abc13419cd5490cde60ba3 | |
| parent | 479825bee23f97ce5e6bf31aaca37fe9d9803a8f (diff) | |
| download | blogit-master.tar.gz blogit-master.tar.bz2 | |
| -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: |
