1. Stefano Rivera
  2. pygame-pypy

Commits

Stefano Rivera  committed 693f483

Retry if non-blocking-read returns EAGAIN

  • Participants
  • Parent commits 865db44
  • Branches default

Comments (0)

Files changed (1)

File test/test_utils/async_sub.py

View file
  • Ignore whitespace
                 if not select.select([conn], [], [], 0)[0]:
                     return ''
                 
-                r = conn.read(maxsize)
+                try:
+                    r = conn.read(maxsize)
+                except IOError, e:
+                    if e.errno == errno.EAGAIN:
+                        return ''
+                    raise
                 if not r:
                     return self._close(which)