1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-24 06:59:52 +01:00

cdxindexer: use ujson if it is available

This commit is contained in:
Ilya Kreymer 2015-10-21 15:28:26 -07:00
parent f3c87c1786
commit b8b473bf19

View File

@ -1,7 +1,12 @@
import os import os
import sys import sys
from json import dumps as json_encode # Use ujson if available
try:
from ujson import dumps as json_encode
except:
from json import dumps as json_encode
try: # pragma: no cover try: # pragma: no cover
from collections import OrderedDict from collections import OrderedDict