diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-20 21:39:30 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-20 21:39:30 +0100 |
commit | 63cef4c7d641ffddaeabcd768020674e2681ba05 (patch) | |
tree | 10b9ee50b927a7673d93db15b896a15a1012f482 /module/utils/__init__.py | |
parent | added ReadWrite lock, render file progress on dashboard (diff) | |
download | pyload-63cef4c7d641ffddaeabcd768020674e2681ba05.tar.xz |
improved ui, render waiting files
Diffstat (limited to 'module/utils/__init__.py')
-rw-r--r-- | module/utils/__init__.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/module/utils/__init__.py b/module/utils/__init__.py index 8f7ed6231..901f553e7 100644 --- a/module/utils/__init__.py +++ b/module/utils/__init__.py @@ -9,6 +9,15 @@ from string import maketrans from itertools import islice from htmlentitydefs import name2codepoint +# abstraction layer for json operations +try: # since python 2.6 + import json +except ImportError: #use system simplejson if available + import simplejson as json + +json_loads = json.loads +json_dumps = json.dumps + def decode(string): """ decode string with utf if possible """ try: |