diff options
-rw-r--r-- | pym/_emerge/AsynchronousLock.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pym/_emerge/AsynchronousLock.py b/pym/_emerge/AsynchronousLock.py index 53fbd22d2..3fe0e9747 100644 --- a/pym/_emerge/AsynchronousLock.py +++ b/pym/_emerge/AsynchronousLock.py @@ -84,8 +84,8 @@ class _LockThread(AbstractPollTask): (before the start() method returns). """ - __slots__ = ('lock_obj', 'path',) + \ - ('_files', '_force_dummy', + __slots__ = ('path',) + \ + ('_files', '_force_dummy', '_lock_obj', '_thread', '_reg_id',) def _start(self): @@ -106,7 +106,7 @@ class _LockThread(AbstractPollTask): self._thread.start() def _run_lock(self): - self.lock_obj = lockfile(self.path, wantnewlockfile=True) + self._lock_obj = lockfile(self.path, wantnewlockfile=True) self._files['pipe_write'].write(b'\0') def _output_handler(self, f, event): @@ -124,12 +124,12 @@ class _LockThread(AbstractPollTask): return self.returncode def unlock(self): - if self.lock_obj is None: + if self._lock_obj is None: raise AssertionError('not locked') if self.returncode is None: raise AssertionError('lock not acquired yet') - unlockfile(self.lock_obj) - self.lock_obj = None + unlockfile(self._lock_obj) + self._lock_obj = None def _unregister(self): self._registered = False |