From f5f3d7e72b4d07bb1531b7312cf47ce76daf19b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Lis=C3=A1k?= Date: Mon, 23 Nov 2015 12:13:07 +0100 Subject: [PATCH] use standard library json instead of simplejson Based on https://review.openstack.org/#/c/240596/ Change-Id: I7f5be799ea7dcb49b7d9df830f1f15ee9a02b3ca --- bin/swauth-cleanup-tokens | 5 +---- bin/swauth-list | 5 +---- bin/swauth-set-account-service | 5 +---- swauth/middleware.py | 5 +---- test/unit/test_middleware.py | 5 +---- 5 files changed, 5 insertions(+), 20 deletions(-) diff --git a/bin/swauth-cleanup-tokens b/bin/swauth-cleanup-tokens index 259558d..5247134 100755 --- a/bin/swauth-cleanup-tokens +++ b/bin/swauth-cleanup-tokens @@ -16,12 +16,9 @@ from datetime import datetime from datetime import timedelta -try: - import simplejson as json -except ImportError: - import json from getpass import getpass import gettext +import json from optparse import OptionParser import re from sys import argv diff --git a/bin/swauth-list b/bin/swauth-list index d7b968d..edeb2ca 100755 --- a/bin/swauth-list +++ b/bin/swauth-list @@ -14,12 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -try: - import simplejson as json -except ImportError: - import json from getpass import getpass import gettext +import json from optparse import OptionParser from sys import argv from sys import exit diff --git a/bin/swauth-set-account-service b/bin/swauth-set-account-service index 63d2359..a8f8089 100755 --- a/bin/swauth-set-account-service +++ b/bin/swauth-set-account-service @@ -14,12 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -try: - import simplejson as json -except ImportError: - import json from getpass import getpass import gettext +import json from optparse import OptionParser from sys import argv from sys import exit diff --git a/swauth/middleware.py b/swauth/middleware.py index 7323700..db54467 100644 --- a/swauth/middleware.py +++ b/swauth/middleware.py @@ -18,10 +18,7 @@ from hashlib import sha1 import hmac from httplib import HTTPConnection from httplib import HTTPSConnection -try: - import simplejson as json -except ImportError: - import json +import json from time import gmtime from time import strftime from time import time diff --git a/test/unit/test_middleware.py b/test/unit/test_middleware.py index 5b6a0af..d04dd82 100644 --- a/test/unit/test_middleware.py +++ b/test/unit/test_middleware.py @@ -14,10 +14,7 @@ # limitations under the License. from contextlib import contextmanager -try: - import simplejson as json -except ImportError: - import json +import json from time import time import unittest