summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-10-22 11:44:00 -0700
committerZac Medico <zmedico@gentoo.org>2010-10-22 11:44:00 -0700
commit8115a6ee3a88badf155953fed12043556f3dd61f (patch)
tree095a87a8f89458645755bb42c57ea4bbfc431b2f
parent4e25ba1dd62fa23ccec3bc6d65ff5502a1ce955e (diff)
downloadportage-8115a6ee3a88badf155953fed12043556f3dd61f.tar.gz
portage-8115a6ee3a88badf155953fed12043556f3dd61f.tar.bz2
portage-8115a6ee3a88badf155953fed12043556f3dd61f.zip
Make _LockThread.lock_obj private.
-rw-r--r--pym/_emerge/AsynchronousLock.py12
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