+
+if punt:
+ with open('bloggers.yml') as b:
+ bloggers = yaml.safe_load(b)
+ for p in punt:
+ if 'end' not in bloggers[p]:
+ bloggers[p]['end'] = datetime.date(*map(int, date.split("-")))
+ with open('bloggers.yml','w') as b:
+ yaml.safe_dump(bloggers, b)
+
+ 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"])