79139758

Date: 2024-10-30 05:40:25
Score: 1
Natty:
Report link

Other solutions did not work for me. Here is a hacky solution that did work for me:

import select

_ORIGINAL_SELECT = select.select


def _safe_select(*args, **kwargs):
    try:
        return _ORIGINAL_SELECT(*args, **kwargs)
    except OSError as e:
        if e.errno == 10038:
            return [], [], []
        else:
            raise

select.select = _safe_select

This code prevents select.select() to raise the OSError 10038

Reasons:
  • Blacklisted phrase (1): did not work
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Gabriele Maurina