def RetryOnSignal(fn, *args, **kwargs):
  while True:
    try:
      return fn(*args, **kwargs)
    except EnvironmentError, err:
      if err.errno != errno.EINTR:
        raise
    except (socket.error, select.error), err:
      # In python 2.6 and above select.error is an IOError, so it's handled
      # above, in 2.5 and below it's not, and it's handled here.
      if not (err.args and err.args[0] == errno.EINTR):
        raise
Perform more complex validation of args that cannot be mixed
dataset/ETHPy150Open ganeti/ganeti/lib/utils/wrapper.py/RetryOnSignal--crossover with--dataset/ETHPy150Open openstack/git-upstream/git_upstream/commands/import.py/ImportCommand.validate