diff MoinMoin/userprefs/oid.py @ 6103:500f68d3e2fd

remove our own usage of python_compatibility module
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 06 Sep 2016 01:00:25 +0200
parents f7f9d35f9d23
children
line wrap: on
line diff
--- a/MoinMoin/userprefs/oid.py	Tue Sep 06 00:26:46 2016 +0200
+++ b/MoinMoin/userprefs/oid.py	Tue Sep 06 01:00:25 2016 +0200
@@ -5,11 +5,11 @@
     @copyright: 2007     MoinMoin:JohannesBerg
     @license: GNU GPL, see COPYING for details.
 """
+import hashlib
 
 from MoinMoin import wikiutil, user
 from MoinMoin.widget import html
 from MoinMoin.userprefs import UserPrefBase
-from MoinMoin.support.python_compatibility import hash_new
 
 try:
     from MoinMoin.auth.openidrp import OpenIDAuth
@@ -46,7 +46,7 @@
             return
         openids = self.request.user.openids[:]
         for oid in self.request.user.openids:
-            name = "rm-%s" % hash_new('sha1', oid).hexdigest()
+            name = "rm-%s" % hashlib.new('sha1', oid).hexdigest()
             if name in self.request.form:
                 openids.remove(oid)
         if not openids and len(self.request.cfg.auth) == 1:
@@ -172,7 +172,7 @@
         _ = self.request.getText
         form = self._make_form()
         for oid in self.request.user.openids:
-            name = "rm-%s" % hash_new('sha1', oid).hexdigest()
+            name = "rm-%s" % hashlib.new('sha1', oid).hexdigest()
             form.append(html.INPUT(type="checkbox", name=name, id=name))
             form.append(html.LABEL(for_=name).append(html.Text(oid)))
             form.append(html.BR())