mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-05-14 20:57:19 -04:00
repair incorrect "cursor" var name in connection faq
Closes: #8075
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/8075
Pull-request-sha: 34e5eaf387
Change-Id: Iab8cdc9f8da68ac955eea75efeba263d0a9dcb7b
This commit is contained in:
committed by
Mike Bayer
parent
4fb6aca6cf
commit
d97de97eff
Vendored
+3
-3
@@ -255,14 +255,14 @@ statement executions::
|
||||
|
||||
|
||||
def reconnecting_engine(engine, num_retries, retry_interval):
|
||||
def _run_with_retries(fn, context, cursor, statement, *arg, **kw):
|
||||
def _run_with_retries(fn, context, cursor_obj, statement, *arg, **kw):
|
||||
for retry in range(num_retries + 1):
|
||||
try:
|
||||
fn(cursor, statement, context=context, *arg)
|
||||
fn(cursor_obj, statement, context=context, *arg)
|
||||
except engine.dialect.dbapi.Error as raw_dbapi_err:
|
||||
connection = context.root_connection
|
||||
if engine.dialect.is_disconnect(
|
||||
raw_dbapi_err, connection, cursor
|
||||
raw_dbapi_err, connection, cursor_obj
|
||||
):
|
||||
if retry > num_retries:
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user