Skip to content

Commit aafa48c

Browse files
committed
Handle a ValueError for operations on a closed file
It seems like this is raised explicitly in some cases.
1 parent ed664b8 commit aafa48c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/pdb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2678,7 +2678,7 @@ def _send(self, **kwargs):
26782678
try:
26792679
self._sockfile.write(json_payload.encode() + b"\n")
26802680
self._sockfile.flush()
2681-
except OSError:
2681+
except (OSError, ValueError):
26822682
# This means that the client has abruptly disconnected, but we'll
26832683
# handle that the next time we try to read from the client instead
26842684
# of trying to handle it from everywhere _send() may be called.

0 commit comments

Comments
 (0)