From a9df8e0f5d49921974ed360a1277f14168aa5101 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 17 May 2011 15:19:20 -0700 Subject: test_asynchronous_lock: simulate SIGINT from tty --- pym/_emerge/AsynchronousLock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pym/_emerge') diff --git a/pym/_emerge/AsynchronousLock.py b/pym/_emerge/AsynchronousLock.py index 86b102b8b..3e7600f17 100644 --- a/pym/_emerge/AsynchronousLock.py +++ b/pym/_emerge/AsynchronousLock.py @@ -184,7 +184,7 @@ class _LockProcess(AbstractPollTask): """ __slots__ = ('path', 'scheduler',) + \ - ('_acquired', '_proc', '_files', '_reg_id', '_unlocked') + ('_acquired', '_kill_test', '_proc', '_files', '_reg_id', '_unlocked') def _start(self): in_pr, in_pw = os.pipe() @@ -216,7 +216,7 @@ class _LockProcess(AbstractPollTask): # If the lock hasn't been aquired yet, the # caller can check the returncode and handle # this failure appropriately. - if not self.cancelled: + if not (self.cancelled or self._kill_test): writemsg_level("_LockProcess: %s\n" % \ _("failed to acquire lock on '%s'") % (self.path,), level=logging.ERROR, noiselevel=-1) -- cgit v1.2.3-1-g7c22