diff --git a/openlp/core/utils/__init__.py b/openlp/core/utils/__init__.py index 561eee4c1..3d5d13e24 100644 --- a/openlp/core/utils/__init__.py +++ b/openlp/core/utils/__init__.py @@ -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) diff --git a/openlp/plugins/remotes/lib/httpserver.py b/openlp/plugins/remotes/lib/httpserver.py index 48a6a4d79..e476bbd68 100644 --- a/openlp/plugins/remotes/lib/httpserver.py +++ b/openlp/plugins/remotes/lib/httpserver.py @@ -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):