From 50471caa0031b20c898644021cbe9a584f4ef908 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Jun 16 2016 18:47:41 +0000 Subject: use python json, but fall back to simplejson --- diff --git a/hub/kojihub.py b/hub/kojihub.py index 2ea1689..c4fc0bc 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -45,7 +45,6 @@ import os import re import rpm import shutil -import simplejson as json import stat import subprocess import sys @@ -57,6 +56,12 @@ import xmlrpclib import zipfile from koji.context import context +try: + import json +except ImportError: + import simplejson as json + + logger = logging.getLogger('koji.hub') def log_error(msg): diff --git a/koji.spec b/koji.spec index b514719..3492cba 100644 --- a/koji.spec +++ b/koji.spec @@ -47,6 +47,9 @@ License: LGPLv2 and GPLv2 Requires: httpd Requires: mod_wsgi Requires: postgresql-python +%if 0%{?rhel} == 5 +Requires: python-simplejson +%endif Requires: %{name} = %{version}-%{release} %description hub