# Timeout here in case the server is unresponsive. The
# --timeout rsync option doesn't apply to the initial
# connection attempt.
- if rsync_initial_timeout:
- portage.exception.AlarmSignal.register(
- rsync_initial_timeout)
try:
+ if rsync_initial_timeout:
+ portage.exception.AlarmSignal.register(
+ rsync_initial_timeout)
+
mypids.extend(portage.process.spawn(
mycommand, returnpid=True, **spawn_kwargs))
exitcode = os.waitpid(mypids[0], 0)[1]
uid=os.getuid())
content = portage.grabfile(tmpservertimestampfile)
finally:
+ if rsync_initial_timeout:
+ portage.exception.AlarmSignal.unregister()
try:
os.unlink(tmpservertimestampfile)
except OSError:
os.waitpid(mypids[0], 0)
# This is the same code rsync uses for timeout.
exitcode = 30
- finally:
- if rsync_initial_timeout:
- portage.exception.AlarmSignal.unregister()
else:
if exitcode != os.EX_OK:
if exitcode & 0xff: