Skip to content

A missed out exception catch in eventio.py #2418

@Aruise

Description

@Aruise

There are two exception catches for OSError, first one is a pass, second one is unreachable since it is caught and passed already.

def unregister(self, fd):
try:
self._epoll.unregister(fd)
except (OSError, ValueError, KeyError, TypeError):
pass
except OSError as exc:
if getattr(exc, 'errno', None) not in (errno.ENOENT, errno.EPERM):
raise

Probably second one should be caught and OSError in first should be deleted?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions