Skip to content

Commit

Permalink
Merge pull request #104 from donalm/master
Browse files Browse the repository at this point in the history
Replaced argument 'async' with 'async_' #103
  • Loading branch information
lopuhin authored Oct 23, 2019
2 parents a243154 + 59d6ada commit 0c43c6e
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 0c43c6e

Please sign in to comment.