diff options
author | James Vasile <james@jamesvasile.com> | 2013-03-28 18:06:48 -0400 |
---|---|---|
committer | James Vasile <james@jamesvasile.com> | 2013-03-28 18:06:48 -0400 |
commit | 3558eaf5e997920da1994aa8f2b52086c0bfbfb4 (patch) | |
tree | 5a045abc97910565e5cefa2212572837a48a6417 | |
parent | 61bc2a440e63c317c5e9910849442e0f3daf2953 (diff) |
fallback to json if simplejson isn't available
-rw-r--r-- | withsqlite.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/withsqlite.py b/withsqlite.py index fcf85c6..8baaf05 100644 --- a/withsqlite.py +++ b/withsqlite.py @@ -14,7 +14,10 @@ This file was developed as part of planeteria <http://github.com/jvasile/planete """ import os, sys, sqlite3, time -import simplejson as json +try: + import simplejson as json +except ImportError: + import json def to_json(python_object): if isinstance(python_object, time.struct_time): |