summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-03 18:02:29 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-03 18:02:29 -0700
commitf0e30a093a082409a1145dea0a7785be8d2b1c21 (patch)
treeb7a5a2cf8cd110784b27d7606e3fd48576675a94
parent13c90823a8e7c4a8fe33d79f34693e642dd8aa81 (diff)
downloadportage-f0e30a093a082409a1145dea0a7785be8d2b1c21.tar.gz
portage-f0e30a093a082409a1145dea0a7785be8d2b1c21.tar.bz2
portage-f0e30a093a082409a1145dea0a7785be8d2b1c21.zip
Fix breakage from previous commit.
-rw-r--r--pym/_emerge/actions.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 294d9a9d0..03ca784d6 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -2130,10 +2130,11 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
# 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]
@@ -2142,6 +2143,8 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
uid=os.getuid())
content = portage.grabfile(tmpservertimestampfile)
finally:
+ if rsync_initial_timeout:
+ portage.exception.AlarmSignal.unregister()
try:
os.unlink(tmpservertimestampfile)
except OSError:
@@ -2154,9 +2157,6 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
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: