[Zope-Checkins] CVS: Zope/lib/python/Products/SiteAccess - VirtualHostMonster.py:1.11

Tres Seaver cvs-admin at zope.org
Tue Nov 18 08:17:38 EST 2003


Update of /cvs-repository/Zope/lib/python/Products/SiteAccess
In directory cvs.zope.org:/tmp/cvs-serv30559/lib/python/Products/SiteAccess

Modified Files:
	VirtualHostMonster.py 
Log Message:
 - Merge tseaver-strexp_delenda-branch to the head.


=== Zope/lib/python/Products/SiteAccess/VirtualHostMonster.py 1.10 => 1.11 ===
--- Zope/lib/python/Products/SiteAccess/VirtualHostMonster.py:1.10	Wed Dec 11 11:55:21 2002
+++ Zope/lib/python/Products/SiteAccess/VirtualHostMonster.py	Tue Nov 18 08:17:07 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