[Zope-Checkins] CVS: Zope2 - Aqueduct.py:1.44.38.1
chrism@serenade.digicool.com
chrism@serenade.digicool.com
Thu, 19 Apr 2001 18:45:13 -0400
Update of /cvs-repository/Zope2/lib/python/Shared/DC/ZRDB
In directory serenade.digicool.com:/home/chrism/sandboxes/RegexExtermination/lib/python/Shared/DC/ZRDB
Modified Files:
Tag: ajung-2_4-ts_regex-exterminiation-branch
Aqueduct.py
Log Message:
Removed regex (but not ts_regex) from this module.
--- Updated File Aqueduct.py in package Zope2 --
--- Aqueduct.py 2001/01/15 16:07:39 1.44
+++ Aqueduct.py 2001/04/19 22:45:13 1.44.38.1
@@ -89,7 +89,7 @@
import Globals, os
from Globals import Persistent
-import DocumentTemplate, DateTime, ts_regex, regex, string
+import DocumentTemplate, DateTime, ts_regex, re, string
import binascii, Acquisition
DateTime.now=DateTime.DateTime
from cStringIO import StringIO
@@ -275,7 +275,7 @@
os.path.join(dtml_dir,'customDefaultReport.dtml'))
def custom_default_report(id, result, action='', no_table=0,
- goofy=regex.compile('[^a-zA-Z0-9_]').search
+ goofy=re.compile('^[a-zA-Z0-9_]').search
):
columns=result._searchable_result_columns()
__traceback_info__=columns
@@ -294,7 +294,8 @@
row=[]
for c in columns:
n=c['name']
- if goofy(n) >= 0: n='expr="_[\'%s]"' % (`'"'+n`[2:])
+ if goofy(n) is not None:
+ n='expr="_[\'%s]"' % (`'"'+n`[2:])
row.append(' %s<dtml-var %s%s>%s'
% (td,n,c['type']!='s' and ' null=""' or '',_td))