[docs] socket.sethostname() error type mistake

Simeon S simeon.simeonov.s at gmail.com
Mon Aug 12 17:42:25 CEST 2013


I believe there is a mistake in the type of error raised by
socket.sethostname(). The documentation says the error returned is
OSError. Here is what I get (3.3.2):

 % python3
Python 3.3.2 (default, Aug  5 2013, 11:52:10)
[GCC 4.5.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket as s
>>> s.sethostname('bla')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
PermissionError: [Errno 1] Operation not permitted


More information about the docs mailing list