From e8f100e751d5ad49b66dad50df424e879f8fe01a Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 18 May 2012 16:07:47 -0400 Subject: fixed some stringification issues --- src/lib/Bcfg2/Server/Plugins/Packages/PackagesSources.py | 2 +- src/lib/Bcfg2/Server/Plugins/Packages/Source.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/PackagesSources.py b/src/lib/Bcfg2/Server/Plugins/Packages/PackagesSources.py index a6924b5d0..2e035a785 100644 --- a/src/lib/Bcfg2/Server/Plugins/Packages/PackagesSources.py +++ b/src/lib/Bcfg2/Server/Plugins/Packages/PackagesSources.py @@ -106,7 +106,7 @@ class PackagesSources(Bcfg2.Server.Plugin.SingleXMLFileBacked, return "PackagesSources: %s" % repr(self.entries) def __str__(self): - return "PackagesSources: %s" % str(self.entries) + return "PackagesSources: %s sources" % len(self.entries) def __len__(self): return len(self.entries) diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Source.py b/src/lib/Bcfg2/Server/Plugins/Packages/Source.py index edcdcd9f2..2bc4b4dc2 100644 --- a/src/lib/Bcfg2/Server/Plugins/Packages/Source.py +++ b/src/lib/Bcfg2/Server/Plugins/Packages/Source.py @@ -169,6 +169,9 @@ class Source(Bcfg2.Server.Plugin.Debuggable): else: return self.__class__.__name__ + def __repr__(self): + return str(self) + def get_urls(self): return [] urls = property(get_urls) -- cgit v1.2.3-1-g7c22