diff options
Diffstat (limited to 'lib/thandy/repository.py')
-rw-r--r-- | lib/thandy/repository.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/thandy/repository.py b/lib/thandy/repository.py index 32108c0..1385dd6 100644 --- a/lib/thandy/repository.py +++ b/lib/thandy/repository.py @@ -3,7 +3,11 @@ import thandy.formats import thandy.util -import simplejson +try: + import json +except ImportError: + import simplejson as json + import logging import os import threading @@ -70,7 +74,7 @@ class RepositoryFile: def _checkContent(self, content): try: - obj = simplejson.loads(content) + obj = json.loads(content) except ValueError, e: raise thandy.FormatException("Couldn't decode content: %s"%e) |