[Zope-Checkins] CVS: Zope/lib/python/Products/SiteAccess -
VirtualHostMonster.py:1.10.44.1
Tres Seaver
cvs-admin at zope.org
Mon Nov 17 17:10:25 EST 2003
Update of /cvs-repository/Zope/lib/python/Products/SiteAccess
In directory cvs.zope.org:/tmp/cvs-serv12097/lib/python/Products/SiteAccess
Modified Files:
Tag: tseaver-strexp_delenda-branch
VirtualHostMonster.py
Log Message:
- Rip string exceptins out by the root.
- webdav/*: clean up block statements for readability.
- XXX: Redirects are now showing up in the error log object; need
to filter!
=== Zope/lib/python/Products/SiteAccess/VirtualHostMonster.py 1.10 => 1.10.44.1 ===
--- Zope/lib/python/Products/SiteAccess/VirtualHostMonster.py:1.10 Wed Dec 11 11:55:21 2002
+++ Zope/lib/python/Products/SiteAccess/VirtualHostMonster.py Mon Nov 17 17:09:55 2003
@@ -47,7 +47,8 @@
try:
host, path = [x.strip() for x in line.split('/', 1)]
except:
- raise 'LineError', 'Needs a slash between host and path'
+ raise ValueError, (
+ 'Line needs a slash between host and path: %s' % line )
pp = filter(None, path.split( '/'))
if pp:
obpath = pp[:]
@@ -63,16 +64,19 @@
try:
ob = self.unrestrictedTraverse(obpath)
except:
- raise 'LineError', 'Path not found'
+ raise ValueError, (
+ 'Path not found: %s' % obpath )
if not getattr(ob.aq_base, 'isAnObjectManager', 0):
- raise 'LineError', ('Path must lead to '
- 'an Object Manager')
+ raise ValueError, (
+ 'Path must lead to an Object Manager: %s'
+ % obpath)
if 'VirtualHostRoot' not in pp:
pp.append('/')
pp.reverse()
try:
int(host.replace('.',''))
- raise 'LineError', 'IP addresses are not mappable'
+ raise ValueError, (
+ 'IP addresses are not mappable: %s' % host)
except ValueError:
pass
if host[:2] == '*.':
More information about the Zope-Checkins
mailing list