forked from openlp/openlp
cherrypy changes
This commit is contained in:
parent
dbaa7c59e4
commit
50b1ba437e
@ -38,7 +38,6 @@ import re
|
|||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
import sys
|
import sys
|
||||||
import urllib2
|
import urllib2
|
||||||
import icu
|
|
||||||
|
|
||||||
from PyQt4 import QtGui, QtCore
|
from PyQt4 import QtGui, QtCore
|
||||||
|
|
||||||
@ -403,6 +402,7 @@ def get_locale_key(string):
|
|||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
global ICU_COLLATOR
|
global ICU_COLLATOR
|
||||||
if ICU_COLLATOR is None:
|
if ICU_COLLATOR is None:
|
||||||
|
import icu
|
||||||
from languagemanager import LanguageManager
|
from languagemanager import LanguageManager
|
||||||
language = LanguageManager.get_language()
|
language = LanguageManager.get_language()
|
||||||
icu_locale = icu.Locale(language)
|
icu_locale = icu.Locale(language)
|
||||||
|
@ -127,7 +127,7 @@ from PyQt4 import QtCore
|
|||||||
from openlp.core.lib import Registry, Settings, PluginStatus, StringContent, image_to_byte
|
from openlp.core.lib import Registry, Settings, PluginStatus, StringContent, image_to_byte
|
||||||
from openlp.core.utils import AppLocation, translate
|
from openlp.core.utils import AppLocation, translate
|
||||||
|
|
||||||
from cherrypy._cpcompat import sha, ntob
|
from hashlib import sha1
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ def make_sha_hash(password):
|
|||||||
Create an encrypted password for the given password.
|
Create an encrypted password for the given password.
|
||||||
"""
|
"""
|
||||||
log.debug("make_sha_hash")
|
log.debug("make_sha_hash")
|
||||||
return sha(ntob(password)).hexdigest()
|
return sha1(password.encode()).hexdigest()
|
||||||
|
|
||||||
|
|
||||||
def fetch_password(username):
|
def fetch_password(username):
|
||||||
|
Loading…
Reference in New Issue
Block a user