[Zope-Checkins] CVS: Zope2 - SimpleItem.py:1.87.4.1

andreas@serenade.digicool.com andreas@serenade.digicool.com
Tue, 17 Apr 2001 16:58:32 -0400


Update of /cvs-repository/Zope2/lib/python/OFS
In directory serenade.digicool.com:/tmp/cvs-serv26774/OFS

Modified Files:
      Tag: ajung-2_4-ts_regex-exterminiation-branch
	SimpleItem.py 
Log Message:
ts_regex/regex free zone



--- Updated File SimpleItem.py in package Zope2 --
--- SimpleItem.py	2001/04/03 15:13:42	1.87
+++ SimpleItem.py	2001/04/17 20:58:31	1.87.4.1
@@ -92,7 +92,7 @@
 $Id$'''
 __version__='$Revision$'[11:-2]
 
-import ts_regex, sys, Globals, App.Management, Acquisition, App.Undo
+import re, sys, Globals, App.Management, Acquisition, App.Undo
 import AccessControl.Role, AccessControl.Owned, App.Common
 from webdav.Resource import Resource
 from ExtensionClass import Base
@@ -213,7 +213,7 @@
         self, client=None, REQUEST={},
         error_type=None, error_value=None, tb=None,
         error_tb=None, error_message='',
-        tagSearch=ts_regex.compile('[a-zA-Z]>').search):
+        tagSearch=re.compile('[a-zA-Z]>').search):
 
         try:
             if error_type  is None: error_type =sys.exc_info()[0]
@@ -245,10 +245,10 @@
                     except:
                         pass
                     else:
-                        if tagSearch(s) >= 0:
+                        if tagSearch(s) is not None:
                             error_message=error_value
                 elif (type(error_value) is StringType
-                      and tagSearch(error_value) >= 0):
+                      and tagSearch(error_value) is not None):
                     error_message=error_value
 
             if client is None: client=self