fix another bug related to punting and dates
[iron-blogger] / weekly-update.py
index 06d85182d84c5cbf127967e0f76837fa970baf62..f55c69c17fef538f4f887048dcbb743b30936ca4 100755 (executable)
@@ -77,13 +77,17 @@ if punt:
         bloggers = yaml.safe_load(b)
     for p in punt:
         if 'end' not in bloggers[p]:
-            bloggers[p]['end'] = today
+            bloggers[p]['end'] = date
     with open('bloggers.yml','w') as b:
         yaml.safe_dump(bloggers, b)
 
-    subprocess.check_call(["git", "commit", "ledger", "bloggers.yml",
-                           "-m", "Punts for %s" % (today,)])
+    if not dry_run:
+        subprocess.check_call(["git", "commit", "ledger", "bloggers.yml",
+                               "-m", "Punts for %s" % (date,)])
 
 # if it's a dry run, lets set the ledger back to the beginning state
 if dry_run:
     subprocess.check_call(["git", "checkout", "ledger"])
+    
+    if punt:
+        subprocess.check_call(["git", "checkout", "bloggers.yml"])

Benjamin Mako Hill || Want to submit a patch?