From e0c79d23399998114284e9f6245e812b8df57474 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 26 May 2011 15:14:07 -0700 Subject: AsynchronousLock: check type in _poll and _cancel --- pym/_emerge/AsynchronousLock.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pym/_emerge') diff --git a/pym/_emerge/AsynchronousLock.py b/pym/_emerge/AsynchronousLock.py index d11797993..debf15302 100644 --- a/pym/_emerge/AsynchronousLock.py +++ b/pym/_emerge/AsynchronousLock.py @@ -70,12 +70,12 @@ class AsynchronousLock(AsynchronousTask): self.wait() def _cancel(self): - if self._imp is not None: + if isinstance(self._imp, AsynchronousTask): self._imp.cancel() def _poll(self): - if self._imp is not None: - return self._imp.poll() + if isinstance(self._imp, AsynchronousTask): + self._imp.poll() return self.returncode def _wait(self): -- cgit v1.2.3-1-g7c22