From 4ebc57ff2a32f7dcaa765995e928b5def6a5cee3 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 1 Dec 2008 05:27:29 +0000 Subject: Add a possible workaround for coderman's Ubuntu's simplejson snafus. 1) Only use json instead of simplejson if json actually works. Apparently there is sometimes a json module that is not the kind of json module you get with python2.6. 2) Check to see if json thinks you should escape /, and try to override that "helpful" choice. git-svn-id: file:///home/or/svnrepo/updater/trunk@17422 55e972cd-5a19-0410-ae62-a4d7a52db4cd --- lib/thandy/keys.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lib/thandy/keys.py') diff --git a/lib/thandy/keys.py b/lib/thandy/keys.py index a243fa7..aa9bbc8 100644 --- a/lib/thandy/keys.py +++ b/lib/thandy/keys.py @@ -13,14 +13,11 @@ import struct import sys import getpass -try: - import json -except ImportError: - import simplejson as json - import thandy.formats import thandy.util +json = thandy.util.importJSON() + class PublicKey: """Abstract base class for public keys.""" def __init__(self): -- cgit v1.2.3