[Zope-Checkins] CVS: Zope2 - ObjectManager.py:1.133.4.1

andreas@serenade.digicool.com andreas@serenade.digicool.com
Tue, 17 Apr 2001 17:51:18 -0400


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

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



--- Updated File ObjectManager.py in package Zope2 --
--- ObjectManager.py	2001/04/09 19:31:27	1.133
+++ ObjectManager.py	2001/04/17 21:51:18	1.133.4.1
@@ -89,7 +89,7 @@
 __version__='$Revision$'[11:-2]
 
 import App.Management, Acquisition, Globals, CopySupport, Products
-import os, App.FactoryDispatcher, ts_regex, Products
+import os, App.FactoryDispatcher, re, Products
 from OFS.Traversable import Traversable
 from Globals import DTMLFile, Persistent
 from Globals import MessageDialog, default__class_init__
@@ -109,7 +109,7 @@
     XMLExportImport.magic: XMLExportImport.importXML,
     }
 
-bad_id=ts_regex.compile('[^a-zA-Z0-9-_~\,\. ]').search #TS
+bad_id=re.compile('[^a-zA-Z0-9-_~\,\. ]').search #TS
 
 # Global constants: __replaceable__ flags:
 NOT_REPLACEABLE = 0
@@ -126,7 +126,7 @@
     # set to false before the object is added.
     if not id or (type(id) != type('')):
         raise BadRequestException, 'Empty or invalid id specified.'
-    if bad_id(id) != -1:
+    if bad_id(id) is not None:
         raise BadRequestException, (
             'The id "%s" contains characters illegal in URLs.' % id)
     if id[0]=='_': raise BadRequestException, (