File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 13
13
/pymysql /tests /databases.json
14
14
__pycache__
15
15
Pipfile.lock
16
+ pdm.lock
Original file line number Diff line number Diff line change @@ -1370,7 +1370,7 @@ def send_data(self):
1370
1370
"""Send data packets from the local file to the server"""
1371
1371
if not self .connection ._sock :
1372
1372
raise err .InterfaceError (0 , "" )
1373
- conn = self .connection
1373
+ conn : Connection = self .connection
1374
1374
1375
1375
try :
1376
1376
with open (self .filename , "rb" ) as open_file :
@@ -1388,5 +1388,6 @@ def send_data(self):
1388
1388
f"Can't find file '{ self .filename } '" ,
1389
1389
)
1390
1390
finally :
1391
- # send the empty packet to signify we are done sending data
1392
- conn .write_packet (b"" )
1391
+ if not conn ._closed :
1392
+ # send the empty packet to signify we are done sending data
1393
+ conn .write_packet (b"" )
You can’t perform that action at this time.
0 commit comments