diff --git a/lib/locking.py b/lib/locking.py
index 59ab7db47d19eb015ca506b6f72fa8aee01f3817..8793fae130e624c2c29511a41254cf23c02d761a 100644
--- a/lib/locking.py
+++ b/lib/locking.py
@@ -731,7 +731,7 @@ class LockSet:
self.__lockdict = {}
for mname in members:
- self.__lockdict[mname] = SharedLock("%s/%s" % (name, mname))
+ self.__lockdict[mname] = SharedLock(self._GetLockName(mname))
# The owner dict contains the set of locks each thread owns. For
# performance each thread can access its own key without a global lock on
@@ -742,6 +742,12 @@ class LockSet:
# will be trouble.
self.__owners = {}
+ def _GetLockName(self, mname):
+ """Returns the name for a member lock.
+
+ """
+ return "%s/%s" % (self.name, mname)
+
def _is_owned(self):
"""Is the current thread a current level owner?"""
return threading.currentThread() in self.__owners
@@ -1049,7 +1055,7 @@ class LockSet:
(invalid_names, self.name))
for lockname in names:
- lock = SharedLock("%s/%s" % (self.name, lockname))
+ lock = SharedLock(self._GetLockName(lockname))
if acquired:
lock.acquire(shared=shared)