The Wayback Machine - https://web.archive.org/web/20250525011139/https://github.com/python/cpython/issues/100218
Skip to content

socket.if_nametoindex('no-such-iface') raises OSError() without setting errno #100218

Open
@socketpair

Description

@socketpair
try:
    if_nametoindex('qweqweq')
except Exception as err:
    print(err.errno)

None

I think it's a bug because I can not distinguish from any other OS errors precisely (like EPERM vs ENOENT or so)

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions