Move AlarmSignal.unregister() call to a better place in action_sync().
authorZac Medico <zmedico@gentoo.org>
Sat, 4 Sep 2010 00:50:53 +0000 (17:50 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 4 Sep 2010 00:50:53 +0000 (17:50 -0700)
pym/_emerge/actions.py

index 0da1d685ba9a22e15476089ad693750911bb1094..294d9a9d0403226f7897338d13326b0ad285640a 100644 (file)
@@ -2142,8 +2142,6 @@ 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:
@@ -2156,6 +2154,9 @@ 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: