10000 Fix InterfaceError response when connection lost (#872) · rainingmaster/PyMySQL@466ecfe · GitHub
[go: up one dir, main page]

Skip to content

Commit 466ecfe

Browse files
authored
Fix InterfaceError response when connection lost (PyMySQL#872)
1 parent d895719 commit 466ecfe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymysql/connections.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ def _execute_command(self, command, sql):
739739
:raise ValueError: If no username was specified.
740740
"""
741741
if not self._sock:
742-
raise err.InterfaceError("(0, '')")
742+
raise err.InterfaceError(0, '')
743743

< 792E /code>
744744
# If the last query was unbuffered, make sure it finishes before
745745
# sending new commands
@@ -1253,7 +1253,7 @@ def __init__(self, filename, connection):
12531253
def send_data(self):
12541254
"""Send data packets from the local file to the server"""
12551255
if not self.connection._sock:
1256-
raise err.InterfaceError("(0, '')")
1256+
raise err.InterfaceError(0, '')
12571257
conn = self.connection
12581258

12591259
try:

0 commit comments

Comments
 (0)
0