[Zope3-checkins] CVS: Zope3/src/zope/app/services - errorr.py:1.4
Stephan Richter
srichter@cbu.edu
Tue, 7 Jan 2003 07:18:38 -0500
Update of /cvs-repository/Zope3/src/zope/app/services
In directory cvs.zope.org:/tmp/cvs-serv11013/app/services
Modified Files:
errorr.py
Log Message:
UnauthenticatedUser has no getLogin() method. This fix is probably not the
right thing todo, but I leave it to someone else (who knows more about it)
to do it correctly. I marked it with a XXX comment.
=== Zope3/src/zope/app/services/errorr.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/services/errorr.py:1.3 Thu Jan 2 08:57:37 2003
+++ Zope3/src/zope/app/services/errorr.py Tue Jan 7 07:18:35 2003
@@ -98,7 +98,12 @@
if hasattr(request, 'URL'):
url = request.URL
try:
- username = ', '.join((request.user.getLogin(),
+ # XXX: UnauthenticatedPrincipal does not have getLogin()
+ if hasattr(request.user, 'getLogin'):
+ login = request.user.getLogin()
+ else:
+ login = 'unauthenticated'
+ username = ', '.join((login,
request.user.getId(),
request.user.getTitle(),
request.user.getDescription()