Fix #921 detect if user has json-py installed and add dumps and loads attributes to it
This commit is contained in:
parent
5b3528c9d1
commit
f12f02fff8
|
@ -36,6 +36,12 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import simplejson as json
|
import simplejson as json
|
||||||
|
|
||||||
|
# Do a little hack here just in case the user has json-py installed since it
|
||||||
|
# has a different api
|
||||||
|
if not hasattr(json, "dumps"):
|
||||||
|
json.dumps = json.write
|
||||||
|
json.loads = json.read
|
||||||
|
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
import xdg, xdg.BaseDirectory
|
import xdg, xdg.BaseDirectory
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue