Permalink
Browse files

python2.5 compat

  • Loading branch information...
1 parent c4eeead commit 679339a5b442c001cf90b5cc88f7745d8f009aa0 @digi604 committed Dec 17, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 cms/test_utils/cli.py
View
6 cms/test_utils/cli.py
@@ -10,11 +10,15 @@
DJANGO_1_3 = LooseVersion(django.get_version()) < LooseVersion('1.4')
def configure(db_url, **extra):
+ splits = db_url.split("://")
+ scheme = splits[0]
+ splits[0] = "http"
+ db_url = "://".join(splits)
db_splits = urlparse(db_url)
from django.conf import settings
os.environ['DJANGO_SETTINGS_MODULE'] = 'cms.test_utils.cli'
if not 'DATABASES' in extra:
- db_type = db_splits.scheme
+ db_type = scheme
if db_type == 'sqlite':
DB = {
'ENGINE': 'django.db.backends.sqlite3',

0 comments on commit 679339a

Please sign in to comment.