]> projects.mako.cc - iron-blogger/commitdiff
fix bug in the render code
authorBenjamin Mako Hill <mako@atdot.cc>
Mon, 24 Sep 2012 01:41:17 +0000 (21:41 -0400)
committerBenjamin Mako Hill <mako@atdot.cc>
Mon, 24 Sep 2012 01:41:17 +0000 (21:41 -0400)
render.py

index 6d6415eea204e612606aa966cb93394d2fa423d0..58cb92e4f249af16c39cf9424fdf89c00c286109 100755 (executable)
--- a/render.py
+++ b/render.py
@@ -13,9 +13,7 @@ from mako.template import Template
 from config import *
 
 def get_balance(acct):
-    balance_cmd_tmp = BALANCE_CMD
-    balance_cmd_tmp.append(acct)
-    p = subprocess.Popen(balance_cmd_tmp,
+    p = subprocess.Popen(BALANCE_CMD + [acct],
                          stdout=subprocess.PIPE)
     (out, _) = p.communicate()
     return float(re.sub(r'\s*(\d+)\s+.*', r'\1', out))

Benjamin Mako Hill || Want to submit a patch?