summaryrefslogtreecommitdiff
path: root/magic.py
diff options
context:
space:
mode:
authorAdam Hupp <adam@hupp.org>2013-09-27 08:41:05 -0700
committerAdam Hupp <adam@hupp.org>2013-09-27 08:45:22 -0700
commit20e713777b8a005bcb81ae7e29db8735a9dbc054 (patch)
treeb60abd04e1ed5ce13c35b9bca3f322deb4488d46 /magic.py
parentea8b2d5b7949463b161c2f7d1db6d71456940a56 (diff)
downloadpython-magic-20e713777b8a005bcb81ae7e29db8735a9dbc054.tar.gz
Use python 2.4-compatible threading.currentThread() call
Diffstat (limited to 'magic.py')
-rw-r--r--magic.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/magic.py b/magic.py
index b644c99..740a5b3 100644
--- a/magic.py
+++ b/magic.py
@@ -52,7 +52,7 @@ class Magic:
magic_load(self.cookie, magic_file)
- self.thread = threading.current_thread()
+ self.thread = threading.currentThread()
def from_buffer(self, buf):
"""
@@ -73,7 +73,7 @@ class Magic:
return magic_file(self.cookie, filename)
def _thread_check(self):
- if self.thread != threading.current_thread():
+ if self.thread != threading.currentThread():
raise Exception('attempting to use libmagic on multiple threads will '
'end in SEGV. Prefer to use the module functions '
'from_file or from_buffer, or carefully manage direct '