diff options
author | Jason Kincl <kincljc@ornl.gov> | 2013-02-25 08:34:52 -0500 |
---|---|---|
committer | Jason Kincl <kincljc@ornl.gov> | 2013-02-25 08:34:52 -0500 |
commit | c0e43f73cb4e98145537543b6275c4cc6dbd5430 (patch) | |
tree | c48049c95328e82be437307de8373c172dd1511d /src/lib | |
parent | 77209f7be86e88604a27b782fd1eae84ef810336 (diff) | |
download | bcfg2-c0e43f73cb4e98145537543b6275c4cc6dbd5430.tar.gz bcfg2-c0e43f73cb4e98145537543b6275c4cc6dbd5430.tar.bz2 bcfg2-c0e43f73cb4e98145537543b6275c4cc6dbd5430.zip |
YUM: Cleaner implementation of missing_attrs() from superclass
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Bcfg2/Client/Tools/YUM.py | 16 |
1 files changed, 4 insertions, 12 deletions
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 |