diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2016-03-03 16:58:24 +0000 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2016-03-03 17:09:15 +0000 |
commit | c9fd828f8adeeed108a326892394c47e3747b558 (patch) | |
tree | 95342271c049b03bea72ccaac7f0a2ffea2a6f47 /lib/extensions.py | |
parent | 7aab934ae5950c6fa1bcd25ed053857538624310 (diff) | |
download | psycopg2-c9fd828f8adeeed108a326892394c47e3747b558.tar.gz |
Allow make_dsn to take no parameter
The behaviour of connect() is unchanged: either dsn or params must be
specified.
Diffstat (limited to 'lib/extensions.py')
-rw-r--r-- | lib/extensions.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/extensions.py b/lib/extensions.py index 39cc4de..2130098 100644 --- a/lib/extensions.py +++ b/lib/extensions.py @@ -158,7 +158,7 @@ class NoneAdapter(object): def make_dsn(dsn=None, **kwargs): """Convert a set of keywords into a connection strings.""" if dsn is None and not kwargs: - raise TypeError('missing dsn and no parameters') + return '' # If no kwarg is specified don't mung the dsn, but verify it if not kwargs: |