def temp_fail_retry(error, fun, *args):
 while 1:
  try:
   return fun(*args)
  except error as e:
   eintr = (errno.WSAEINTR if (os.name == 'nt') else errno.EINTR)
   if (e.args[0] == eintr):
    continue
   raise

def temp_fail_retry ( error , fun , * args ) : while 1 : try : return fun ( * args ) except error as e : eintr = ( errno . WSAEINTR if ( os . name == 'nt' ) else errno . EINTR ) if ( e . args [ 0 ] == eintr ) : continue raise
retry to execute function .