sos/0033-Rename-validatePlugin-to-validate_plugin.patch
Bryn M. Reeves 5261563507 Update sos to 3.1
Update sos to the 3.1 upstream release and add post-release patches
from the development tree.
2014-04-01 12:25:00 +01:00

45 lines
1.6 KiB
Diff

From db8839351479c60234bb6873394d93b56f0174eb Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Wed, 12 Mar 2014 19:36:02 +0000
Subject: [PATCH 33/61] Rename validatePlugin to validate_plugin
This one somehow didn't get the memo about camelCase not being
cool any more in sos. Rename the method to comply with pep8 and
not be so ugly.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
sos/policies/__init__.py | 2 +-
sos/sosreport.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
index c272e5c..b91d0fd 100644
--- a/sos/policies/__init__.py
+++ b/sos/policies/__init__.py
@@ -198,7 +198,7 @@ No changes will be made to system configuration.
return tempfile.gettempdir()
return opt_tmp_dir
- def validatePlugin(self, plugin_class):
+ def validate_plugin(self, plugin_class):
"""
Verifies that the plugin_class should execute under this policy
"""
diff --git a/sos/sosreport.py b/sos/sosreport.py
index 0faa364..fe78abd 100644
--- a/sos/sosreport.py
+++ b/sos/sosreport.py
@@ -763,7 +763,7 @@ class SoSReport(object):
tuple(self.policy.valid_subclasses))
for plugin_class in plugin_classes:
- if not self.policy.validatePlugin(plugin_class):
+ if not self.policy.validate_plugin(plugin_class):
self.soslog.warning(_("plugin %s does not validate, skipping") % plug)
if self.opts.verbosity > 0:
self._skip(plugin_class, _("does not validate"))
--
1.7.11.7