diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-05-28 16:12:15 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-05-28 16:12:15 +0000 |
commit | 03e305d65bacd2b0b1b657a2e1c352a5291ce488 (patch) | |
tree | 9dbc51648157e92a0eb6fb8936de987465659706 /lib/sqlalchemy/engine/url.py | |
parent | 348c993bc0b0096845406749068de6fc34f50fdf (diff) | |
download | sqlalchemy-03e305d65bacd2b0b1b657a2e1c352a5291ce488.tar.gz |
raises error for bad url
Diffstat (limited to 'lib/sqlalchemy/engine/url.py')
-rw-r--r-- | lib/sqlalchemy/engine/url.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/engine/url.py b/lib/sqlalchemy/engine/url.py index d79213c68..548650322 100644 --- a/lib/sqlalchemy/engine/url.py +++ b/lib/sqlalchemy/engine/url.py @@ -1,5 +1,6 @@ import re import cgi +import sqlalchemy.exceptions as exceptions class URL(object): def __init__(self, drivername, username=None, password=None, host=None, port=None, database=None): @@ -68,7 +69,7 @@ def _parse_rfc1738_args(name): opts = {'username':username,'password':password,'host':host,'port':port,'database':database} return URL(name, **opts) else: - return None + raise exceptions.ArgumentError("Could not parse rfc1738 URL from string '%s'" % name) def _parse_keyvalue_args(name): m = re.match( r'(\w+)://(.*)', name) |