Merge pull request #546 from campagnola/fix-travis-eintr

Add check for EINTR during example testing to avoid sporadic test failures on travis
This commit is contained in:
Luke Campagnola 2017-09-03 22:22:01 -07:00 committed by GitHub
commit 44a95c865d

View File

@ -3,6 +3,7 @@ import subprocess
import time
import os
import sys
import errno
from pyqtgraph.pgcollections import OrderedDict
from pyqtgraph.python2_3 import basestring
@ -143,7 +144,14 @@ except:
output = ''
fail = False
while True:
c = process.stdout.read(1).decode()
try:
c = process.stdout.read(1).decode()
except IOError as err:
if err.errno == errno.EINTR:
# Interrupted system call; just try again.
c = ''
else:
raise
output += c
#sys.stdout.write(c)
#sys.stdout.flush()