From f37fdb3e1374aa6742fb3cb902812132641a745d Mon Sep 17 00:00:00 2001 From: Tim Laszlo Date: Mon, 21 May 2012 12:24:00 -0500 Subject: Packages: Print more information when a source type fails to load If a yum type is used on python 2.4 and simplejson is not installed, this message is the only error Packages: Unknown source type Yum --- src/lib/Bcfg2/Server/Plugins/Packages/PackagesSources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/Bcfg2/Server/Plugins/Packages/PackagesSources.py') diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/PackagesSources.py b/src/lib/Bcfg2/Server/Plugins/Packages/PackagesSources.py index 2e035a785..88e5bea6c 100644 --- a/src/lib/Bcfg2/Server/Plugins/Packages/PackagesSources.py +++ b/src/lib/Bcfg2/Server/Plugins/Packages/PackagesSources.py @@ -86,8 +86,8 @@ class PackagesSources(Bcfg2.Server.Plugin.SingleXMLFileBacked, stype.title()).Server.Plugins.Packages, stype.title()) cls = getattr(module, "%sSource" % stype.title()) - except (ImportError, AttributeError): - self.logger.error("Packages: Unknown source type %s" % stype) + except (ImportError, AttributeError), ex: + self.logger.error("Packages: Unknown source type %s (%s)" % (stype, ex)) return None try: -- cgit v1.2.3-1-g7c22