From: Benjamin Mako Hill Date: Mon, 14 Nov 2011 21:20:01 +0000 (-0500) Subject: only commit to git if the update is not the dry run X-Git-Url: https://projects.mako.cc/source/iron-blogger/commitdiff_plain/1c8a87b02aae31b111907415779d7df230357a24 only commit to git if the update is not the dry run --- diff --git a/weekly-update.py b/weekly-update.py index ad6ef1a..acfc17b 100755 --- a/weekly-update.py +++ b/weekly-update.py @@ -25,8 +25,9 @@ with open('ledger', 'a') as f: f.write("\n") f.write(render.render_template('templates/ledger', date)) -subprocess.check_call(["git", "commit", "ledger", - "-m", "Update for %s" % (date,)]) +if not dry_run: + subprocess.check_call(["git", "commit", "ledger", + "-m", "Update for %s" % (date,)]) debts = render.get_debts() punt = []