ImportError routine fixup #3

grutz opened this Issue Feb 6, 2011 · 1 comment

2 participants


The import routine for cjson/json/simplejson doesn't work as expected. As written it will always require simplejson to be installed unless BOTH cjson and json are imported.

This works better:

# JSON library importing
cjson = None
json = None
    import cjson
except ImportError:
        import json
    except ImportError:
            import simplejson as json
        except ImportError:
            raise ImportError('You must have the cjson, json, or simplejson ' +
                              'module(s) available.')

Hey, thanks for this catch -- I've pushed this update. Feel free to check it out, and if you are satisfied it is fixed, please close the issue.

Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment