Commit 14154167 authored by Evan Simpson's avatar Evan Simpson

Merge VHM fix from 2.6 branch

parent 0e8c41cc
......@@ -8,6 +8,8 @@ Zope Changes
Bugs Fixed
- VirtualHostMonster handles empty Mapping paths properly.
- Deadlock prevention code added.
It was possible for earlier versions of ZODB to deadlock when
......
......@@ -59,13 +59,14 @@ class VirtualHostMonster(Persistent, Item, Implicit):
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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment