summaryrefslogtreecommitdiff
path: root/raw_post
diff options
context:
space:
mode:
Diffstat (limited to 'raw_post')
-rw-r--r--raw_post9
1 files changed, 2 insertions, 7 deletions
diff --git a/raw_post b/raw_post
index 641a1a4..edaf222 100644
--- a/raw_post
+++ b/raw_post
@@ -49,13 +49,8 @@ else:
print "A problem occured while editing the contents file"
raise SystemExit
-token_path = os.path.join (repo, "token")
-token = int (open (token_path).read ()) if os.path.exists (token_path) else 0
-open (token_path, "w").write (str (token + 1))
-
-subprocess.call (["git", "add", token_path])
-
-p = subprocess.Popen (["git", "commit", "-F", "-"], stdin = subprocess.PIPE)
+p = subprocess.Popen (["git", "commit", "--allow-empty", "-F", "-"],
+ stdin = subprocess.PIPE)
p.communicate ("%s\n\n%s" % (title, contents))
if p.returncode == 0: print "New post successfully added"