From 1e35f59965d554448d9723bf6a1d5c3c6bc1fb44 Mon Sep 17 00:00:00 2001 From: Craig Kerstiens Date: Wed, 7 Sep 2011 14:39:38 -0700 Subject: [PATCH] updating to have pip conf and cleaning up exception --- bin/compile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bin/compile b/bin/compile index ead1384..8a20d87 100755 --- a/bin/compile +++ b/bin/compile @@ -33,6 +33,13 @@ done echo "-----> Preparing virtualenv version $(virtualenv --version)" virtualenv --no-site-packages . | sed -u 's/^/ /' +mkdir .pip +cat >>.pip/pip.conf < Byte-compiling code" find . -name "*.py" | grep -v bin/manage.py | xargs bin/python -m py_compile @@ -59,13 +66,12 @@ try: 'HOST': url.hostname, 'PORT': url.port, } - if 'postgres' in os.environ['DATABASE_URL']: + if url.scheme == 'postgres': DATABASES['default']['ENGINE'] = 'django.db.backends.postgresql_psycopg2', - if 'mysql' in os.environ['DATABASE_URL']: + if url.scheme == 'mysql': DATABASES['default']['ENGINE'] = 'django.db.backends.mysql', except: print "Unexpected error:", sys.exc_info() - raise EOF