def _eintr_retry_call(func, *args):
    """Fixes OSErrors and IOErrors

    From: http://code.google.com/p/seascope/source/detail?spec=svn8dbe5e23d41db673727ce90fd338e9a43f8877e8&name=8dbe5e23d41d&r=8dbe5e23d41db673727ce90fd338e9a43f8877e8
    IOError added
    """
    while True:
        try:
            return func(*args)
        except (__HOLE__, IOError), e: # pragma: no cover
            if e.errno == errno.EINTR:
                continue
            raise
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/packages/CLTools/init.py/_eintr_retry_call