diff options
-rwxr-xr-x | bin/ebuild-ipc.py | 4 | ||||
-rw-r--r-- | pym/portage/exception.py | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/bin/ebuild-ipc.py b/bin/ebuild-ipc.py index b3d28a789..baa7abb4c 100755 --- a/bin/ebuild-ipc.py +++ b/bin/ebuild-ipc.py @@ -49,8 +49,8 @@ class EbuildIpc(object): start_time = time.time() try: - portage.exception.AlarmSignal.register() - signal.alarm(self._COMMUNICATE_TIMEOUT_SECONDS) + portage.exception.AlarmSignal.register( + self._COMMUNICATE_TIMEOUT_SECONDS) returncode = self._communicate(args) return returncode except portage.exception.AlarmSignal: diff --git a/pym/portage/exception.py b/pym/portage/exception.py index dca1100e6..ae655542a 100644 --- a/pym/portage/exception.py +++ b/pym/portage/exception.py @@ -91,8 +91,9 @@ class AlarmSignal(TimeoutException): self.frame = frame @classmethod - def register(cls): + def register(cls, time): signal.signal(signal.SIGALRM, cls._signal_handler) + signal.alarm(time) @classmethod def unregister(cls): |