forked from pool/python-lockfile
thread has ident == None OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lockfile?expand=0&rev=8
12 lines
546 B
Diff
12 lines
546 B
Diff
--- lockfile-0.9.1/lockfile/__init__.py.orig 2012-02-02 13:32:51.133789612 +0100
|
|
+++ lockfile-0.9.1/lockfile/__init__.py 2012-02-02 13:33:13.024241010 +0100
|
|
@@ -167,7 +167,7 @@
|
|
t = threading.current_thread()
|
|
# Thread objects in Python 2.4 and earlier do not have ident
|
|
# attrs. Worm around that.
|
|
- ident = getattr(t, "ident", hash(t))
|
|
+ ident = getattr(t, "ident", hash(t)) or hash(t)
|
|
self.tname = "-%x" % (ident & 0xffffffff)
|
|
else:
|
|
self.tname = ""
|