From 1c8a87b02aae31b111907415779d7df230357a24 Mon Sep 17 00:00:00 2001 From: Benjamin Mako Hill Date: Mon, 14 Nov 2011 16:20:01 -0500 Subject: [PATCH] only commit to git if the update is not the dry run --- weekly-update.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 = [] -- 2.30.2