summaryrefslogtreecommitdiff
path: root/lib/thandy/lockfile/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/thandy/lockfile/__init__.py')
-rwxr-xr-x[-rw-r--r--]lib/thandy/lockfile/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/thandy/lockfile/__init__.py b/lib/thandy/lockfile/__init__.py
index a167cd8..6ed31d5 100644..100755
--- a/lib/thandy/lockfile/__init__.py
+++ b/lib/thandy/lockfile/__init__.py
@@ -168,6 +168,8 @@ class LockBase:
# Thread objects in Python 2.4 and earlier do not have ident
# attrs. Worm around that.
ident = getattr(t, "ident", hash(t))
+ if ident is None:
+ ident = hash(t)
self.tname = "-%x" % (ident & 0xffffffff)
else:
self.tname = ""