From 906bb7c1ecc5c34aa93148894eef763f27eba98e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 12 May 2015 12:22:20 +0200 Subject: Other import fixes --- pyload/utils/__init__.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'pyload/utils') diff --git a/pyload/utils/__init__.py b/pyload/utils/__init__.py index 864a214cc..3c525caeb 100644 --- a/pyload/utils/__init__.py +++ b/pyload/utils/__init__.py @@ -4,6 +4,7 @@ """ Store all useful functions here """ import bitmath +import htmlentitydefs import os import re import string @@ -11,18 +12,10 @@ import sys import time import urllib -# from gettext import gettext -import pylgettext as gettext -from htmlentitydefs import name2codepoint +import pyload.utils.pylgettext as gettext # abstraction layer for json operations -try: - import simplejson as json -except ImportError: - import json - -json_loads = json.loads -json_dumps = json.dumps +from bottle import json_loads def os.chmod(*args): @@ -232,7 +225,7 @@ def fixup(m): # named entity try: name = text[1:-1] - text = unichr(name2codepoint[name]) + text = unichr(htmlentitydefs.name2codepoint[name]) except KeyError: pass -- cgit v1.2.3