From c0e43f73cb4e98145537543b6275c4cc6dbd5430 Mon Sep 17 00:00:00 2001 From: Jason Kincl Date: Mon, 25 Feb 2013 08:34:52 -0500 Subject: YUM: Cleaner implementation of missing_attrs() from superclass --- src/lib/Bcfg2/Client/Tools/YUM.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/lib/Bcfg2/Client/Tools/YUM.py b/src/lib/Bcfg2/Client/Tools/YUM.py index b40083e98..92568c070 100644 --- a/src/lib/Bcfg2/Client/Tools/YUM.py +++ b/src/lib/Bcfg2/Client/Tools/YUM.py @@ -291,18 +291,10 @@ class YUM(Bcfg2.Client.Tools.PkgTool): """ Implementing from superclass to check for existence of either name or group attribute for Package entry in the case of a YUM group. """ - required = self.__req__[entry.tag] - if isinstance(required, dict): - required = ["type"] - try: - required.extend(self.__req__[entry.tag][entry.get("type")]) - except KeyError: - pass - - missing = [attr for attr in required - if attr not in entry.attrib or not entry.attrib[attr]] - - if entry.get('name', None) == None and entry.get('group', None) == None: + missing = Bcfg2.Client.Tools.PkgTool.missing_attrs(self, entry) + + if entry.get('name', None) == None and + entry.get('group', None) == None: missing += ['name', 'group'] return missing -- cgit v1.2.3-1-g7c22