From 84931196041c64e8c302013df238b3be62cf3917 Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Fri, 25 Mar 2005 02:07:16 +0000 Subject: [PATCH] In some cases it's necessary to run ZSI in a python environment where threading is not available, such as http://www.freebsd.org/cgi/url.cgi?ports/www/mod_python/pkg-descr Attached is a patch which addresses this issue for ZSI. --- XMLSchema.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/XMLSchema.py b/XMLSchema.py index 16760e2..e7569ef 100755 --- a/XMLSchema.py +++ b/XMLSchema.py @@ -15,11 +15,20 @@ ident = "$Id$" import types, weakref, sys -from threading import RLock from Namespaces import XMLNS from Utility import DOM, DOMException, Collection, SplitQName, basejoin from StringIO import StringIO +# If we have no threading, this should be a no-op +try: + from threading import RLock +except ImportError: + class RLock: + def acquire(): + pass + def release(): + pass + # # Collections in XMLSchema class #