From a22054395bd0e82376ff874899ba35c47ad4a379 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Aug 08 2016 22:04:26 +0000 Subject: use python json, but fall back to simplejson --- diff --git a/hub/kojihub.py b/hub/kojihub.py index feacf4a..f1c3834 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -46,7 +46,6 @@ import os import re import rpm import shutil -import simplejson as json import stat import subprocess import sys @@ -58,6 +57,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 a1b3f28..7e752bb 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