From: Josep Pascual Badia Date: Mon, 30 May 2022 14:41:55 +0000 (-0400) Subject: repair incorrect "cursor" var name in connection faq X-Git-Tag: rel_1_4_37~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a9f23038ea8ace5c7fb2c323f2ee38a15fa07dd;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git repair incorrect "cursor" var name in connection faq Closes: #8075 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/8075 Pull-request-sha: 34e5eaf3870f89c9c38ffe81121fa1b42e363752 Change-Id: Iab8cdc9f8da68ac955eea75efeba263d0a9dcb7b (cherry picked from commit d97de97eff21af3bdacffc2b625feb7e0bd6c18c) --- diff --git a/doc/build/faq/connections.rst b/doc/build/faq/connections.rst index 1bee24c324..504c47485b 100644 --- a/doc/build/faq/connections.rst +++ b/doc/build/faq/connections.rst @@ -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