commit | 6d58d64919bb12e05fa4bf3a34909650c695cff6 | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Sun Mar 20 23:56:36 2011 +0100 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Sun Mar 20 23:56:36 2011 +0100 |
tree | a8b7d7915779a6cc30f7f6a9d69191d7bd34a002 | |
parent | b938bcd211bfcab13be38200a2f59947691118bb [diff] [blame] |
Issue #11127: Raise a TypeError when trying to pickle a socket object.
diff --git a/Lib/socket.py b/Lib/socket.py index 1e28549..5715034 100644 --- a/Lib/socket.py +++ b/Lib/socket.py
@@ -112,6 +112,9 @@ s[7:]) return s + def __getstate__(self): + raise TypeError("Cannot serialize socket object") + def dup(self): """dup() -> socket object