New submission from Muhammad Toufeeq Ockards: I was using the telnetlib on linux in python 2.7 and ran into error that executed line 320 of https://hg.python.org/cpython/file/2.7/Lib/telnetlib.py
---------------------------------- 319: except select.error as e: 320: if e.errno == errno.EINTR: ------------------------------------ Inspecting select.error showed that it has no errno attribute. I opened up a python2.7 idle session on my computer and entered the following. --------------------------------------------------------- >>> import select >>> try: ... raise select.error ... except Exception as e: ... pass ... >>> e error() >>> dir(e) ['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__getitem__', '__getslice__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setstate__', '__sizeof__', '__str__', '__subclasshook__', '__unicode__', '__weakref__', 'args', 'message'] >>> e.errno Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'error' object has no attribute 'errno' >>> ------------------------------------------------------------- ---------- components: Library (Lib) messages: 267603 nosy: Muhammad Toufeeq Ockards priority: normal severity: normal status: open title: telnetlib AttributeError: 'error' object has no attribute 'errno' (handling of select.error) type: behavior versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27247> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com