diff options
author | tavis_rudd <tavis_rudd> | 2007-11-14 23:16:08 +0000 |
---|---|---|
committer | tavis_rudd <tavis_rudd> | 2007-11-14 23:16:08 +0000 |
commit | 16612e76bcc782084a0c507d342cbc8998efe9a1 (patch) | |
tree | a7e831786b2e76a838849c2b33119ac7e4389ab0 | |
parent | f84cdad072f1dd5ecb8aa182cea44efe2742ab88 (diff) | |
download | python-cheetah-16612e76bcc782084a0c507d342cbc8998efe9a1.tar.gz |
replace lock with RLock to avoid deadlock
-rw-r--r-- | CHANGES | 4 | ||||
-rwxr-xr-x | src/ImportHooks.py | 12 |
2 files changed, 10 insertions, 6 deletions
@@ -2,6 +2,10 @@ Please initial your changes (there's a key at bottom) and add a date for each release ================================================================================ +2.0.1 (unreleased) + - fixed a deadlock Christoph Zwerschke found in Cheetah.ImportHooks. + [TR] + 2.0 (Oct 12, 2007) !!!THIS RELEASE REQUIRES RECOMPILATION OF ALL COMPILED CHEETAH TEMPLATES!!! diff --git a/src/ImportHooks.py b/src/ImportHooks.py index 9d50119..b622138 100755 --- a/src/ImportHooks.py +++ b/src/ImportHooks.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# $Id: ImportHooks.py,v 1.25 2006/06/20 19:23:27 tavis_rudd Exp $ +# $Id: ImportHooks.py,v 1.26 2007/11/14 23:16:08 tavis_rudd Exp $ """Provides some import hooks to allow Cheetah's .tmpl files to be imported directly like Python .py modules. @@ -13,12 +13,12 @@ Meta-Data Author: Tavis Rudd <tavis@damnsimple.com> License: This software is released for unlimited distribution under the terms of the MIT license. See the LICENSE file. -Version: $Revision: 1.25 $ +Version: $Revision: 1.26 $ Start Date: 2001/03/30 -Last Revision Date: $Date: 2006/06/20 19:23:27 $ +Last Revision Date: $Date: 2007/11/14 23:16:08 $ """ __author__ = "Tavis Rudd <tavis@damnsimple.com>" -__revision__ = "$Revision: 1.25 $"[11:-2] +__revision__ = "$Revision: 1.26 $"[11:-2] import sys import os.path @@ -26,7 +26,7 @@ import types import __builtin__ import new import imp -from threading import Lock +from threading import RLock import string import traceback from Cheetah import ImportManager @@ -48,7 +48,7 @@ def setCacheDir(cacheDir): ## CLASSES class CheetahDirOwner(DirOwner): - _lock = Lock() + _lock = RLock() _acquireLock = _lock.acquire _releaseLock = _lock.release |