From: lukens Date: Thu, 10 Oct 2019 16:06:15 +0000 (-0400) Subject: added additional error message to is_disconnect() for Firebird dialects X-Git-Tag: rel_1_3_11~43^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98a72709b0e8e48cb8e1ac0bc959ab88e03d7815;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git added additional error message to is_disconnect() for Firebird dialects Added additional "disconnect" message "Error writing data to the connection" to Firebird disconnection detection. Pull request courtesy lukens. Fixes: #4903 Closes: #4904 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4904 Pull-request-sha: c56d7c4abf6b6c8263efaf070b4e7a319e12a875 Change-Id: Ib70c20c616e7519b933fee587a3b3e8dbb4c2f81 (cherry picked from commit 31e3fc94ad268cf762f564209113d66221b04b42) --- diff --git a/doc/build/changelog/unreleased_13/4903.rst b/doc/build/changelog/unreleased_13/4903.rst new file mode 100644 index 0000000000..d6d2850963 --- /dev/null +++ b/doc/build/changelog/unreleased_13/4903.rst @@ -0,0 +1,7 @@ +.. change:: + :tags: bug, firebird + :tickets: 4903 + + Added additional "disconnect" message "Error writing data to the + connection" to Firebird disconnection detection. Pull request courtesy + lukens. diff --git a/lib/sqlalchemy/dialects/firebird/kinterbasdb.py b/lib/sqlalchemy/dialects/firebird/kinterbasdb.py index 9880ee89f3..3312aeeaea 100644 --- a/lib/sqlalchemy/dialects/firebird/kinterbasdb.py +++ b/lib/sqlalchemy/dialects/firebird/kinterbasdb.py @@ -188,7 +188,8 @@ class FBDialect_kinterbasdb(FBDialect): ): msg = str(e) return ( - "Unable to complete network request to host" in msg + "Error writing data to the connection" in msg + or "Unable to complete network request to host" in msg or "Invalid connection state" in msg or "Invalid cursor state" in msg or "connection shutdown" in msg