Skip to content
Browse files

Fix python2.4 compatibility for run-graphite-devel-server.py

  • Loading branch information...
1 parent a43c22c commit a806612fdf875f71e8aa60e7457598d9fa6122d0 @mleinart mleinart committed Feb 20, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 bin/run-graphite-devel-server.py
View
8 bin/run-graphite-devel-server.py
@@ -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!"

0 comments on commit a806612

Please sign in to comment.
Something went wrong with that request. Please try again.