diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-09-24 13:25:01 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-09-25 11:58:48 -0400 |
commit | 3428eab79ab21d1ecee6d2f8edff083a2cccdf79 (patch) | |
tree | 9f19144fe7d5161c9208f50aa0b6a9945682a967 /src/lib/Bcfg2/Server/Plugins/Packages | |
parent | 6d4d8df68717780239fad273dd722359db10e64b (diff) | |
download | bcfg2-3428eab79ab21d1ecee6d2f8edff083a2cccdf79.tar.gz bcfg2-3428eab79ab21d1ecee6d2f8edff083a2cccdf79.tar.bz2 bcfg2-3428eab79ab21d1ecee6d2f8edff083a2cccdf79.zip |
made json optional again
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Packages')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Packages/Yum.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py b/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py index 4224798a8..04d4e9f74 100644 --- a/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py +++ b/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py @@ -61,7 +61,7 @@ from subprocess import Popen, PIPE import Bcfg2.Server.Plugin # pylint: disable=W0622 from Bcfg2.Compat import StringIO, cPickle, HTTPError, URLError, \ - ConfigParser, json, any + ConfigParser, any # pylint: enable=W0622 from Bcfg2.Server.Plugins.Packages.Collection import Collection from Bcfg2.Server.Plugins.Packages.Source import SourceInitError, Source, \ @@ -81,11 +81,16 @@ except ImportError: try: import yum + try: + import json + except ImportError: + import simplejson as json HAS_YUM = True except ImportError: HAS_YUM = False LOGGER.info("Packages: No yum libraries found; forcing use of internal " "dependency resolver") + # pylint: enable=E0611,F0401 XP = '{http://linux.duke.edu/metadata/common}' |