diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-03-20 22:56:36 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-03-20 22:56:36 (GMT) |
commit | 6d58d64919bb12e05fa4bf3a34909650c695cff6 (patch) | |
tree | a8b7d7915779a6cc30f7f6a9d69191d7bd34a002 /Lib/socket.py | |
parent | b938bcd211bfcab13be38200a2f59947691118bb (diff) | |
download | cpython-6d58d64919bb12e05fa4bf3a34909650c695cff6.zip cpython-6d58d64919bb12e05fa4bf3a34909650c695cff6.tar.gz cpython-6d58d64919bb12e05fa4bf3a34909650c695cff6.tar.bz2 |
Issue #11127: Raise a TypeError when trying to pickle a socket object.
Diffstat (limited to 'Lib/socket.py')
-rw-r--r-- | Lib/socket.py | 3 |
1 files changed, 3 insertions, 0 deletions
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 @@ class socket(_socket.socket): s[7:]) return s + def __getstate__(self): + raise TypeError("Cannot serialize socket object") + def dup(self): """dup() -> socket object |