From c699aa5d150d46126a6aad7e871969fc273ad881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E6=B5=A9?= Date: Thu, 11 Apr 2024 14:24:50 +0800 Subject: [PATCH] Update base.py support new error msg --- mysql_server_has_gone_away/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql_server_has_gone_away/base.py b/mysql_server_has_gone_away/base.py index 66b3a46..7162934 100644 --- a/mysql_server_has_gone_away/base.py +++ b/mysql_server_has_gone_away/base.py @@ -17,7 +17,7 @@ def wrapper(self, query, args=None): except (OperationalError, InterfaceError) as e: logger.warn("MySQL server has gone away. Rerunning query: %s", query) if ( - 'MySQL server has gone away' in str(e) or + 'server has gone away' in str(e) or 'Lost connection to MySQL server during query' in str(e) ): db_wrapper.connection.close()