diff options
| author | Adam Hupp <adam@hupp.org> | 2013-09-27 08:41:05 -0700 |
|---|---|---|
| committer | Adam Hupp <adam@hupp.org> | 2013-09-27 08:45:22 -0700 |
| commit | 20e713777b8a005bcb81ae7e29db8735a9dbc054 (patch) | |
| tree | b60abd04e1ed5ce13c35b9bca3f322deb4488d46 /magic.py | |
| parent | ea8b2d5b7949463b161c2f7d1db6d71456940a56 (diff) | |
| download | python-magic-20e713777b8a005bcb81ae7e29db8735a9dbc054.tar.gz | |
Use python 2.4-compatible threading.currentThread() call
Diffstat (limited to 'magic.py')
| -rw-r--r-- | magic.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 ' |
