summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>2009-12-21 09:53:03 -0800
committerAlexandre Fayolle <alexandre.fayolle@logilab.fr>2009-12-21 09:53:03 -0800
commit46f1fb86d12a005d4ed11299fafda19bf4e7b7c1 (patch)
treeef61eef5d89e22092150b4d40a6e4fff5f43161a
parentc833ed02a3330d826c5a0f96bf14ec846d2344bf (diff)
downloadlogilab-common-46f1fb86d12a005d4ed11299fafda19bf4e7b7c1.tar.gz
2 bugs in extra_args processing fixed
* extra_args not passed in get_connection to driver.connect * check for None before parsing the string
-rw-r--r--db.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/db.py b/db.py
index 8e832ff..c67cd21 100644
--- a/db.py
+++ b/db.py
@@ -629,7 +629,8 @@ class _PyodbcAdapter(DBAPIAdapter):
required.
"""
pyodbc = self._native_module
- self._process_extra_args(extra_args)
+ if extra_args is not None:
+ self._process_extra_args(extra_args)
class PyodbcCursor(object):
"""cursor adapting usual dict format to pyodbc format
in SQL queries
@@ -861,7 +862,7 @@ def get_connection(driver='postgres', host='', database='', user='',
pass
if port:
port = int(port)
- return adapted_module.connect(host, database, user, password, port=port)
+ return adapted_module.connect(host, database, user, password, port=port, extra_args=extra_args)
from logilab.common.deprecation import moved