locking: Export “list_owned” from lock manager
authorMichael Hanselmann <hansmi@google.com>
Fri, 29 Apr 2011 10:45:47 +0000 (12:45 +0200)
committerMichael Hanselmann <hansmi@google.com>
Fri, 29 Apr 2011 12:41:48 +0000 (14:41 +0200)
This is analog to “is_owned” and will be used for assertions.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

lib/locking.py

index 57d2600..be9cd13 100644 (file)
@@ -1384,6 +1384,8 @@ class GanetiLockManager:
     """
     return self.__keyring[level]._list_owned()
 
+  list_owned = _list_owned
+
   def _upper_owned(self, level):
     """Check that we don't own any lock at a level greater than the given one.