[Checkins] SVN: Sandbox/philikon/five.publication/trunk/five/publication/request.py The way I read the ZopeBook Appendix B, BASE{PATH} has to do with the

Philipp von Weitershausen philikon at philikon.de
Sun Aug 5 17:53:13 EDT 2007


Log message for revision 78607:
  The way I read the ZopeBook Appendix B, BASE{PATH} has to do with the
  application's root URL. This is what request.getApplicationURL() should do
  in zope.publisher, but apparently I'm still missing something...
  

Changed:
  U   Sandbox/philikon/five.publication/trunk/five/publication/request.py

-=-
Modified: Sandbox/philikon/five.publication/trunk/five/publication/request.py
===================================================================
--- Sandbox/philikon/five.publication/trunk/five/publication/request.py	2007-08-05 21:38:52 UTC (rev 78606)
+++ Sandbox/philikon/five.publication/trunk/five/publication/request.py	2007-08-05 21:53:13 UTC (rev 78607)
@@ -50,12 +50,13 @@
 
         # support BASEn, BASEPATHn
         if key.startswith('BASE'):
-            # XXX just 'BASE'???
             match = BASEmatch(key)
             if match is not None:
                 pathonly, n = match.groups()
-                # XXX I have no clue what to return here
-                return self.getURL(int(n)-1, bool(pathonly))
+                try:
+                    return self.getApplicationURL(int(n), bool(pathonly))
+                except IndexError:
+                    raise KeyError(key)
 
         # support BODY
         #XXX



More information about the Checkins mailing list