Skip to content

Commit

Permalink
Fix python2.4 compatibility for run-graphite-devel-server.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mleinart committed Feb 20, 2012
1 parent a43c22c commit a806612
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/run-graphite-devel-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@

django_admin = None
for name in ('django-admin', 'django-admin.py'):
try:
django_admin = subprocess.check_output(['which', name])
process = subprocess.Popen(['which', name], stdout=subprocess.PIPE)
output = process.stdout.read().strip()
if process.wait() == 0:
django_admin = output
break
except subprocess.CalledProcessError:
pass

if not django_admin:
print "Could not find a django-admin script!"
Expand Down

0 comments on commit a806612

Please sign in to comment.