New submission from Richard Oudkerk:

ctypes.WinError() is defined as

    def WinError(code=None, descr=None):
        if code is None:
            code = GetLastError()
        if descr is None:
            descr = FormatError(code).strip()
        return WindowsError(code, descr)

Since WindowsError became an alias for OSError, this means that if e is the 
exception raised, e.errno == GetLastError() and e.winerror == None.

I think the last line should be

        return WindowsError(None, descr, None, code)

----------
messages: 172419
nosy: sbt
priority: normal
severity: normal
stage: needs patch
status: open
title: ctypes.WinError() confuses errno with winerror
type: behavior
versions: Python 3.3, Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16169>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to