[Zope-Checkins] CVS: Products/SiteAccess - VirtualHostMonster.py:1.10
Evan Simpson
evan@zope.com
Wed, 11 Dec 2002 11:55:22 -0500
Update of /cvs-repository/Products/SiteAccess
In directory cvs.zope.org:/tmp/cvs-serv24262/lib/python/Products/SiteAccess
Modified Files:
VirtualHostMonster.py
Log Message:
Merge VHM fix from 2.6 branch
=== Products/SiteAccess/VirtualHostMonster.py 1.9 => 1.10 ===
--- Products/SiteAccess/VirtualHostMonster.py:1.9 Wed Aug 14 18:25:10 2002
+++ Products/SiteAccess/VirtualHostMonster.py Wed Dec 11 11:55:21 2002
@@ -59,13 +59,14 @@
while i2 < len(obpath) and obpath[i2][:4] == '_vh_':
i2 = i2 + 1
del obpath[i1:i2]
- try:
- ob = self.unrestrictedTraverse(obpath)
- except:
- raise 'LineError', 'Path not found'
- if not getattr(ob.aq_base, 'isAnObjectManager', 0):
- raise 'LineError', ('Path must lead to '
- 'an Object Manager')
+ if obpath:
+ try:
+ ob = self.unrestrictedTraverse(obpath)
+ except:
+ raise 'LineError', 'Path not found'
+ if not getattr(ob.aq_base, 'isAnObjectManager', 0):
+ raise 'LineError', ('Path must lead to '
+ 'an Object Manager')
if 'VirtualHostRoot' not in pp:
pp.append('/')
pp.reverse()