mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
use stdlib's json module if simplejson is missing
json is available in Python >= 2.6
This commit is contained in:
parent
ec9a457e3e
commit
20d4f961b6
5
fabfile.py
vendored
5
fabfile.py
vendored
@ -7,7 +7,10 @@
|
|||||||
# plinth box
|
# plinth box
|
||||||
|
|
||||||
import os,sys, subprocess
|
import os,sys, subprocess
|
||||||
import simplejson as json
|
try:
|
||||||
|
import simplejson as json
|
||||||
|
except ImportError:
|
||||||
|
import json
|
||||||
import fabric.api
|
import fabric.api
|
||||||
from fabric.api import local, env, cd, put, get, task
|
from fabric.api import local, env, cd, put, get, task
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,10 @@ Author: Erez Shinan
|
|||||||
Date : 31-May-2009
|
Date : 31-May-2009
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import simplejson as json ## jlv replaced pickle with json
|
try:
|
||||||
|
import simplejson as json ## jlv replaced pickle with json
|
||||||
|
except ImportError:
|
||||||
|
import json
|
||||||
|
|
||||||
import UserDict
|
import UserDict
|
||||||
##import cPickle as pickle
|
##import cPickle as pickle
|
||||||
|
|||||||
5
menu.py
5
menu.py
@ -1,5 +1,8 @@
|
|||||||
import simplejson as json
|
|
||||||
from urlparse import urlparse
|
from urlparse import urlparse
|
||||||
|
try:
|
||||||
|
import simplejson as json
|
||||||
|
except ImportError:
|
||||||
|
import json
|
||||||
import cherrypy
|
import cherrypy
|
||||||
import cfg
|
import cfg
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
import os
|
import os
|
||||||
import simplejson as json
|
try:
|
||||||
|
import simplejson as json
|
||||||
|
except ImportError:
|
||||||
|
import json
|
||||||
import cherrypy
|
import cherrypy
|
||||||
import cfg
|
import cfg
|
||||||
from model import User
|
from model import User
|
||||||
|
|||||||
@ -7,7 +7,10 @@ haven't figured that one all the way through yet.
|
|||||||
|
|
||||||
import os, sys
|
import os, sys
|
||||||
import cherrypy
|
import cherrypy
|
||||||
import simplejson as json
|
try:
|
||||||
|
import simplejson as json
|
||||||
|
except ImportError:
|
||||||
|
import json
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
from plugin_mount import PagePlugin
|
from plugin_mount import PagePlugin
|
||||||
from modules.auth import require
|
from modules.auth import require
|
||||||
|
|||||||
@ -1,7 +1,10 @@
|
|||||||
import os, subprocess
|
import os, subprocess
|
||||||
from socket import gethostname
|
from socket import gethostname
|
||||||
import cherrypy
|
import cherrypy
|
||||||
import simplejson as json
|
try:
|
||||||
|
import simplejson as json
|
||||||
|
except ImportError:
|
||||||
|
import json
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
from filedict import FileDict
|
from filedict import FileDict
|
||||||
from modules.auth import require
|
from modules.auth import require
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
import os
|
import os
|
||||||
import cherrypy
|
import cherrypy
|
||||||
import simplejson as json
|
try:
|
||||||
|
import simplejson as json
|
||||||
|
except ImportError:
|
||||||
|
import json
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
from filedict import FileDict
|
from filedict import FileDict
|
||||||
from modules.auth import require
|
from modules.auth import require
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
import os
|
import os
|
||||||
import cherrypy
|
import cherrypy
|
||||||
import simplejson as json
|
try:
|
||||||
|
import simplejson as json
|
||||||
|
except ImportError:
|
||||||
|
import json
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
from filedict import FileDict
|
from filedict import FileDict
|
||||||
from auth import require
|
from auth import require
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
import os
|
import os
|
||||||
import cherrypy
|
import cherrypy
|
||||||
import simplejson as json
|
try:
|
||||||
|
import simplejson as json
|
||||||
|
except ImportError:
|
||||||
|
import json
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
from filedict import FileDict
|
from filedict import FileDict
|
||||||
from modules.auth import require
|
from modules.auth import require
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user