[Zope-Checkins] CVS: Zope/lib/python/Products/ZCatalog -
ZCatalog.py:1.126.2.3
Andreas Jung
andreas at andreas-jung.com
Fri Mar 19 08:23:26 EST 2004
Update of /cvs-repository/Zope/lib/python/Products/ZCatalog
In directory cvs.zope.org:/tmp/cvs-serv18918
Modified Files:
Tag: Zope-2_7-branch
ZCatalog.py
Log Message:
Do not raise an exception if REQUEST is None. This situation occurs
if one calls e.g. manage_reindexIndex() from scripts without passing a REQUEST.
=== Zope/lib/python/Products/ZCatalog/ZCatalog.py 1.126.2.2 => 1.126.2.3 ===
--- Zope/lib/python/Products/ZCatalog/ZCatalog.py:1.126.2.2 Sun Dec 7 11:15:56 2003
+++ Zope/lib/python/Products/ZCatalog/ZCatalog.py Fri Mar 19 08:23:25 2004
@@ -790,11 +790,12 @@
style url. If no object is found, None is returned.
No exceptions are raised.
"""
- script=REQUEST.script
- if path.find(script) != 0:
- path='%s/%s' % (script, path)
- try: return REQUEST.resolve_url(path)
- except: pass
+ if REQUEST:
+ script=REQUEST.script
+ if path.find(script) != 0:
+ path='%s/%s' % (script, path)
+ try: return REQUEST.resolve_url(path)
+ except: pass
def resolve_path(self, path):
"""
More information about the Zope-Checkins
mailing list