comparison MoinMoin/script/migration/wikiutil160a.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 9d510417add0
children
comparison
equal deleted inserted replaced
6102:df21062e294d 6103:500f68d3e2fd
7 @license: GNU GPL, see COPYING for details. 7 @license: GNU GPL, see COPYING for details.
8 """ 8 """
9 9
10 import cgi 10 import cgi
11 import codecs 11 import codecs
12 import hashlib
12 import os 13 import os
13 import re 14 import re
14 import time 15 import time
15 import urllib 16 import urllib
16 17
1576 ### Tickets - used by RenamePage and DeletePage 1577 ### Tickets - used by RenamePage and DeletePage
1577 ######################################################################## 1578 ########################################################################
1578 1579
1579 def createTicket(request, tm=None): 1580 def createTicket(request, tm=None):
1580 """Create a ticket using a site-specific secret (the config)""" 1581 """Create a ticket using a site-specific secret (the config)"""
1581 from MoinMoin.support.python_compatibility import hash_new
1582 ticket = tm or "%010x" % time.time() 1582 ticket = tm or "%010x" % time.time()
1583 digest = hash_new('sha1', ticket) 1583 digest = hashlib.new('sha1', ticket)
1584 1584
1585 varnames = ['data_dir', 'data_underlay_dir', 'language_default', 1585 varnames = ['data_dir', 'data_underlay_dir', 'language_default',
1586 'mail_smarthost', 'mail_from', 'page_front_page', 1586 'mail_smarthost', 'mail_from', 'page_front_page',
1587 'theme_default', 'sitename', 'logo_string', 1587 'theme_default', 'sitename', 'logo_string',
1588 'interwikiname', 'user_homewiki', 'acl_rights_before', ] 1588 'interwikiname', 'user_homewiki', 'acl_rights_before', ]