From cf3c6f86ffe436aa740aad6b45603c51d2a01e16 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Wed, 26 Sep 2012 11:47:06 +0100 Subject: [PATCH] Improved error message on connect when kwargs are passed together with dns --- lib/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/__init__.py b/lib/__init__.py index b84236c4..e49bcd77 100644 --- a/lib/__init__.py +++ b/lib/__init__.py @@ -165,9 +165,8 @@ def connect(dsn=None, if dsn is not None and items: raise InterfaceError( - "you cannot specify keyword arguments (%s)" - " together with a connection string" - % ", ".join([k for k, v in items])) + "'%s' is an invalid keyword argument when the dsn is specified" + % items[0][0]) if dsn is None: if not items: