[Zope3-checkins]
SVN: Zope3/branches/stephan_and_jim-response-refactor/src/zope/publisher/
Fixed ILoggingInfo lookup failure. If no adapter exists,
just log a dash,
Stephan Richter
srichter at cosmos.phy.tufts.edu
Fri Sep 2 19:52:50 EDT 2005
Log message for revision 38280:
Fixed ILoggingInfo lookup failure. If no adapter exists, just log a dash,
which stands for not available. The info is used for logging only.
Changed:
U Zope3/branches/stephan_and_jim-response-refactor/src/zope/publisher/browser.py
U Zope3/branches/stephan_and_jim-response-refactor/src/zope/publisher/http.py
-=-
Modified: Zope3/branches/stephan_and_jim-response-refactor/src/zope/publisher/browser.py
===================================================================
--- Zope3/branches/stephan_and_jim-response-refactor/src/zope/publisher/browser.py 2005-09-02 23:37:10 UTC (rev 38279)
+++ Zope3/branches/stephan_and_jim-response-refactor/src/zope/publisher/browser.py 2005-09-02 23:52:49 UTC (rev 38280)
@@ -647,11 +647,6 @@
self.response.outstream = outstream
- def setPrincipal(self, principal):
- # HTTPRequest needs to notify the HTTPTask of the username.
- # We don't want to have to stub HTTPTask in the tests.
- BaseRequest.setPrincipal(self, principal)
-
def _createResponse(self):
return BBBResponse()
Modified: Zope3/branches/stephan_and_jim-response-refactor/src/zope/publisher/http.py
===================================================================
--- Zope3/branches/stephan_and_jim-response-refactor/src/zope/publisher/http.py 2005-09-02 23:37:10 UTC (rev 38279)
+++ Zope3/branches/stephan_and_jim-response-refactor/src/zope/publisher/http.py 2005-09-02 23:52:49 UTC (rev 38280)
@@ -443,8 +443,11 @@
def setPrincipal(self, principal):
'See IPublicationRequest'
super(HTTPRequest, self).setPrincipal(principal)
- logging_info = ILoggingInfo(principal)
- message = logging_info.getLogMessage()
+ logging_info = ILoggingInfo(principal, None)
+ if logging_info is None:
+ message = '-'
+ else:
+ message = logging_info.getLogMessage()
self.response.authUser = message
def _createResponse(self):
More information about the Zope3-Checkins
mailing list