Ensure we get URL objects.

This commit is contained in:
Ryan Leckey
2013-11-04 14:48:46 -08:00
parent 456bef3e85
commit 5f3266541e

View File

@@ -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'):