]> projects.mako.cc - iron-blogger/commitdiff
fix to work with earlier versions of python
authorBenjamin Mako Hill <mako@atdot.cc>
Thu, 23 Aug 2012 19:13:13 +0000 (15:13 -0400)
committerBenjamin Mako Hill <mako@atdot.cc>
Thu, 23 Aug 2012 19:13:13 +0000 (15:13 -0400)
config.py

index fa3a133f1ea28c0d4e1daad4333f7bd86c79609f..6b6d5882f993d0f838f15920284a7010826b1c24 100644 (file)
--- a/config.py
+++ b/config.py
@@ -17,7 +17,7 @@ FINE_SIZE = 5
 CURRENCY = "$"
 
 # check the version of ledger to find out which commands to use
 CURRENCY = "$"
 
 # check the version of ledger to find out which commands to use
-if subprocess.check_output(['ledger', '--version'])[7] == "3":
+if subprocess.Popen(['ledger', '--version'], stdout=subprocess.PIPE).communicate()[0][7] == '3'
     BALANCE_CMD = ['ledger', '-f', os.path.join(HERE,'ledger'),
                    '--no-color', '-n', 'balance']
 
     BALANCE_CMD = ['ledger', '-f', os.path.join(HERE,'ledger'),
                    '--no-color', '-n', 'balance']
 

Benjamin Mako Hill || Want to submit a patch?