diff options
author | 2015-05-12 12:22:20 +0200 | |
---|---|---|
committer | 2015-05-12 12:22:20 +0200 | |
commit | 906bb7c1ecc5c34aa93148894eef763f27eba98e (patch) | |
tree | 2f09a639cdd9e414e8f165a667c71a837288d4de /pyload/utils/__init__.py | |
parent | Revert damaged logo.png (diff) | |
download | pyload-906bb7c1ecc5c34aa93148894eef763f27eba98e.tar.xz |
Other import fixes
Diffstat (limited to 'pyload/utils/__init__.py')
-rw-r--r-- | pyload/utils/__init__.py | 15 |
1 files changed, 4 insertions, 11 deletions
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 |