From 545f1a77ad8a5416a852085cf0b38f038159e337 Mon Sep 17 00:00:00 2001 From: Harry Gabriel Date: Fri, 12 Nov 2010 19:52:41 +0100 Subject: [PATCH] use json if the import of simplejson fails --- pyweb/djextdirect/formprovider.py | 5 ++++- pyweb/djextdirect/provider.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pyweb/djextdirect/formprovider.py b/pyweb/djextdirect/formprovider.py index 5122835..8d036a1 100644 --- a/pyweb/djextdirect/formprovider.py +++ b/pyweb/djextdirect/formprovider.py @@ -15,7 +15,10 @@ * GNU General Public License for more details. """ -import simplejson +try: + import simplejson +except ImportError: + import json as simplejson import functools from django import forms diff --git a/pyweb/djextdirect/provider.py b/pyweb/djextdirect/provider.py index f30b5e1..e8d2a24 100644 --- a/pyweb/djextdirect/provider.py +++ b/pyweb/djextdirect/provider.py @@ -15,7 +15,10 @@ * GNU General Public License for more details. """ -import simplejson +try: + import simplejson +except ImportError: + import json as simplejson import inspect import functools import traceback