From 5f3266541e00ccb21cd020a698f988b459578e56 Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Mon, 4 Nov 2013 14:48:46 -0800 Subject: [PATCH] Ensure we get URL objects. --- sqlalchemy_utils/functions/database.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sqlalchemy_utils/functions/database.py b/sqlalchemy_utils/functions/database.py index cf94740..8c16e71 100644 --- a/sqlalchemy_utils/functions/database.py +++ b/sqlalchemy_utils/functions/database.py @@ -9,7 +9,7 @@ def database_exists(url): """Check if a database exists. """ - url = copy(url) + url = copy(make_url(url)) database = url.database url.database = None @@ -43,7 +43,7 @@ def create_database(url, encoding='utf8'): """Issue the appropriate CREATE DATABASE statement. """ - url = copy(url) + url = copy(make_url(url)) database = url.database if not url.drivername.startswith('sqlite'): @@ -76,7 +76,7 @@ def drop_database(url): """Issue the appropriate DROP DATABASE statement. """ - url = copy(url) + url = copy(make_url(url)) database = url.database if not url.drivername.startswith('sqlite'):