All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 2770ce0f authored by Timothy Stack's avatar Timothy Stack

os.execve throws an exception instead of returning an error code

(doh).  Catch the exception and print a more useful error message.
parent 62bdde15
......@@ -956,7 +956,14 @@ def rsync(host, base, dlpath, paths = ["/"], port = None, output = False,
0664)
os.dup2(fd, 2)
pass
os.execve(RSYNC, cmd, os.environ)
try:
os.execve(RSYNC, cmd, os.environ)
except OSError, e:
sys.stderr.write(
"error: unable to exec '%s' - %s\n"
"error: args=%s\n"
% (RSYNC, e.strerror, `cmd`))
pass
os._exit(127)
pass
except:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment