def _eintr_retry(func, *args):
 while True:
  try:
   return func(*args)
  except (OSError, select.error) as e:
   if (e.args[0] != errno.EINTR):
    raise

def _eintr_retry ( func , * args ) : while True : try : return func ( * args ) except ( OSError , select . error ) as e : if ( e . args [ 0 ] != errno . EINTR ) : raise
restart a system call interrupted by eintr .