cherrypy changes

This commit is contained in:
Tim Bentley 2013-07-27 12:30:38 +02:00 committed by Andreas Preikschat
parent dbaa7c59e4
commit 50b1ba437e
2 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,6 @@ import re
from subprocess import Popen, PIPE
import sys
import urllib2
import icu
from PyQt4 import QtGui, QtCore
@ -403,6 +402,7 @@ def get_locale_key(string):
if os.name == 'nt':
global ICU_COLLATOR
if ICU_COLLATOR is None:
import icu
from languagemanager import LanguageManager
language = LanguageManager.get_language()
icu_locale = icu.Locale(language)

View File

@ -127,7 +127,7 @@ from PyQt4 import QtCore
from openlp.core.lib import Registry, Settings, PluginStatus, StringContent, image_to_byte
from openlp.core.utils import AppLocation, translate
from cherrypy._cpcompat import sha, ntob
from hashlib import sha1
log = logging.getLogger(__name__)
@ -137,7 +137,7 @@ def make_sha_hash(password):
Create an encrypted password for the given password.
"""
log.debug("make_sha_hash")
return sha(ntob(password)).hexdigest()
return sha1(password.encode()).hexdigest()
def fetch_password(username):