Skip to content

Commit

Permalink
Replaced argument 'async' with 'async_' chtd#103
Browse files Browse the repository at this point in the history
  • Loading branch information
donalm committed Sep 22, 2018
1 parent e29932c commit 59d6ada
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions psycopg2cffi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ def connect(dsn=None,
if port is not None:
items.append(('port', port))

kwasync = {}
async_ = False
if 'async' in kwargs:
kwasync['async'] = kwargs.pop('async')
async_ = kwargs.pop('async')
if 'async_' in kwargs:
kwasync['async_'] = kwargs.pop('async_')
async_ = kwargs.pop('async_')

items.extend([(k, v) for (k, v) in kwargs.items() if v is not None])

Expand All @@ -108,7 +108,7 @@ def connect(dsn=None,
dsn = " ".join(["%s=%s" % (k, _param_escape(str(v)))
for (k, v) in items])

conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
conn = _connect(dsn, connection_factory=connection_factory, async_=async_)
if cursor_factory is not None:
conn.cursor_factory = cursor_factory

Expand Down

0 comments on commit 59d6ada

Please sign in to comment.