From 89ddbdac554c806147805c47d5b3ceabaa6739f0 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Mon, 3 Dec 2012 19:50:53 -0600 Subject: fixed SELinux tool/plugin tests --- src/lib/Bcfg2/Client/Tools/SELinux.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/lib/Bcfg2/Client/Tools/SELinux.py') diff --git a/src/lib/Bcfg2/Client/Tools/SELinux.py b/src/lib/Bcfg2/Client/Tools/SELinux.py index 7aa0e8a20..6bd728114 100644 --- a/src/lib/Bcfg2/Client/Tools/SELinux.py +++ b/src/lib/Bcfg2/Client/Tools/SELinux.py @@ -93,8 +93,12 @@ class SELinux(Bcfg2.Client.Tools.Tool): return self.GenericSEVerify elif attr.startswith("InstallSE"): return self.GenericSEInstall - else: - return object.__getattr__(self, attr) + # there's no need for an else here, because python checks for + # an attribute in the "normal" ways first. i.e., if self.txn + # is used, __getattr__() is never called because txn exists as + # a "normal" attribute of this object. See + # http://docs.python.org/2/reference/datamodel.html#object.__getattr__ + # for details def BundleUpdated(self, _, states): for handler in self.handlers.values(): -- cgit v1.2.3-1-g7c22