summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/AsynchronousLock.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/_emerge/AsynchronousLock.py')
-rw-r--r--pym/_emerge/AsynchronousLock.py6
1 files changed, 3 insertions, 3 deletions
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):