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:
commit
44a95c865d
@ -3,6 +3,7 @@ import subprocess
|
|||||||
import time
|
import time
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import errno
|
||||||
from pyqtgraph.pgcollections import OrderedDict
|
from pyqtgraph.pgcollections import OrderedDict
|
||||||
from pyqtgraph.python2_3 import basestring
|
from pyqtgraph.python2_3 import basestring
|
||||||
|
|
||||||
@ -143,7 +144,14 @@ except:
|
|||||||
output = ''
|
output = ''
|
||||||
fail = False
|
fail = False
|
||||||
while True:
|
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
|
output += c
|
||||||
#sys.stdout.write(c)
|
#sys.stdout.write(c)
|
||||||
#sys.stdout.flush()
|
#sys.stdout.flush()
|
||||||
|
Loading…
Reference in New Issue
Block a user