import json/simplejson in one place and use that

This commit is contained in:
j 2010-07-28 15:08:06 +02:00
commit eae4803cd3
6 changed files with 19 additions and 18 deletions

View file

@ -2,7 +2,8 @@
# vi:si:et:sw=4:sts=4:ts=4
# GPL 2009
import os
import simplejson
from ox.utils import json
def get(key):
@ -12,7 +13,7 @@ def get(key):
f = open(user_auth, "r")
data = f.read()
f.close()
auth = simplejson.loads(data)
auth = json.loads(data)
if key in auth:
return auth[key]
print "please add key %s to json file '%s'" % (key, user_auth)