[Zope3-checkins] SVN: Zope3/branches/srichter-twisted-integration/src/zope/publisher/http.py If no adapter exists, then do not record the username.

Stephan Richter srichter at cosmos.phy.tufts.edu
Wed Apr 20 20:26:02 EDT 2005


Log message for revision 30069:
  If no adapter exists, then do not record the username.
  

Changed:
  U   Zope3/branches/srichter-twisted-integration/src/zope/publisher/http.py

-=-
Modified: Zope3/branches/srichter-twisted-integration/src/zope/publisher/http.py
===================================================================
--- Zope3/branches/srichter-twisted-integration/src/zope/publisher/http.py	2005-04-20 22:44:49 UTC (rev 30068)
+++ Zope3/branches/srichter-twisted-integration/src/zope/publisher/http.py	2005-04-21 00:26:02 UTC (rev 30069)
@@ -468,10 +468,11 @@
         'See IPublicationRequest'
         super(HTTPRequest, self).setPrincipal(principal)
 
-        logging_info = ILoggingInfo(principal)
-        message = logging_info.getLogMessage()
-        if message is not None:
-            self.response.setHeader('x-zope-principal', message)
+        logging_info = ILoggingInfo(principal, None)
+        if logging_info is not None:
+            message = logging_info.getLogMessage()
+            if message is not None:
+                self.response.setHeader('x-zope-principal', message)
 
     def _createResponse(self, outstream):
         # Should be overridden by subclasses



More information about the Zope3-Checkins mailing list