[Zope-Checkins] CVS: Zope2 - util.py:1.3
shane@digicool.com
shane@digicool.com
Fri, 1 Jun 2001 12:50:06 -0400 (EDT)
Update of /cvs-repository/Zope2/lib/python/Products/PluginIndexes/common
In directory korak.digicool.com:/tmp/cvs-serv26372
Modified Files:
util.py
Log Message:
Made it so the parseIndexRequest constructor doesn't blow up on a MultiMapping.
--- Updated File util.py in package Zope2 --
--- util.py 2001/05/30 15:57:36 1.2
+++ util.py 2001/06/01 16:50:06 1.3
@@ -190,13 +190,16 @@
else:
self.keys = [keys]
- params = filter(lambda x,id=self.id: x.startswith(id+'_') , \
- request.keys())
+ if hasattr(request, 'keys'):
+ # Look through the entire request for extra parameters.
+ # This is expensive!
+ params = filter(lambda x,id=self.id: x.startswith(id+'_'),
+ request.keys())
- params = map(lambda x,id=self.id: x[len(id)+1:],params)
+ params = map(lambda x,id=self.id: x[len(id)+1:],params)
- for p in params:
- setattr(self,p,request[self.id+'_'+p])
+ for p in params:
+ setattr(self,p,request[self.id+'_'+p])
if self.keys != None:
self.keys = filter(lambda x: len(str(x))>0 , self.keys)