14
0

- added a patch to fix a TypeError in LockBase.__init__ when the current

thread has ident == None

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lockfile?expand=0&rev=8
This commit is contained in:
Sascha Peilicke
2012-06-11 12:30:00 +00:00
committed by Git OBS Bridge
parent 00c8b973b5
commit ef1421c703
3 changed files with 25 additions and 3 deletions

View File

@@ -0,0 +1,11 @@
--- 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 = ""