aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/threading.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/threading.py')
-rw-r--r--Lib/threading.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/threading.py b/Lib/threading.py
index fb9ef75d281..b6c451d1fba 100644
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -158,7 +158,7 @@ class _RLock:
except KeyError:
pass
return "<%s %s.%s object owner=%r count=%d at %s>" % (
- "locked" if self._block.locked() else "unlocked",
+ "locked" if self.locked() else "unlocked",
self.__class__.__module__,
self.__class__.__qualname__,
owner,
@@ -237,7 +237,7 @@ class _RLock:
def locked(self):
"""Return whether this object is locked."""
- return self._count > 0
+ return self._block.locked()
# Internal methods used by condition variables