summaryrefslogtreecommitdiff
path: root/lib/thandy/formats.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/thandy/formats.py')
-rw-r--r--lib/thandy/formats.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/thandy/formats.py b/lib/thandy/formats.py
index c44c9cf..42e3d79 100644
--- a/lib/thandy/formats.py
+++ b/lib/thandy/formats.py
@@ -1,6 +1,10 @@
# Copyright 2008 The Tor Project, Inc. See LICENSE for licensing information.
-import simplejson
+try:
+ import json
+except ImportError:
+ import simplejson as json
+
import time
import re
import binascii
@@ -154,7 +158,7 @@ def checkSignatures(signed, keyDB, role=None, path=None):
return SignatureStatus(goodSigs, badSigs, unknownSigs, tangentialSigs)
def _encodeCanonical(obj, outf):
- # Helper for encodeCanonical. Older versions of simplejson.encoder don't
+ # Helper for encodeCanonical. Older versions of json.encoder don't
# even let us replace the separators.
def canonical_str_encoder(s):