web/views/euser.py
changeset 586 09ec2839e447
parent 568 3f6aaa6ae3b2
child 619 9efa2cc9c02c
--- a/web/views/euser.py	Wed Feb 11 17:41:46 2009 +0100
+++ b/web/views/euser.py	Wed Feb 11 17:42:30 2009 +0100
@@ -14,11 +14,6 @@
 from cubicweb.web.form import EntityForm
 from cubicweb.web.views.baseviews import PrimaryView, EntityView
 
-try:
-    from hashlib import sha1 as sha 
-
-except ImportError:
-    from sha import sha
 
 class EUserPrimaryView(PrimaryView):
     accepts = ('EUser',)
@@ -72,8 +67,8 @@
                    % html_escape(entity.firstname))
         emailaddr = entity.get_email()
         if emailaddr:
-            self.w(u'<foaf:mbox>%s</foaf:mbox>\n' % html_escape(unicode(emailaddr)))
-            self.w(u'</foaf:Person>\n')
+            self.w(u'<foaf:mbox>%s</foaf:mbox>\n' % html_escape(emailaddr))
+        self.w(u'</foaf:Person>\n')
 
 
 class EditGroups(EntityForm):