aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2013-08-21 16:39:20 +0100
committerBryn M. Reeves <bmr@redhat.com>2013-08-21 16:39:20 +0100
commite109475ef82607345ffbbcabba1d5d471400b9ac (patch)
treef1d97963859771a890dca656e32cdfb15d82ccf6
parent4a85755f9013e760ef0e3c608f936beb894da3c3 (diff)
downloadsos-e109475ef82607345ffbbcabba1d5d471400b9ac.tar.gz
Rename Plugin.get_cmd_dir() to get_cmd_path()
The method to retrieve the path into which a plug-in's collected command output returns a path as a string rather than a directory object. Make this clear by renaming the method to 'get_cmd_path()'. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/__init__.py6
-rw-r--r--sos/plugins/cloudforms.py4
-rw-r--r--sos/plugins/lvm2.py2
-rw-r--r--sos/plugins/rhui.py2
-rw-r--r--sos/plugins/satellite.py2
-rw-r--r--sos/plugins/selinux.py2
6 files changed, 9 insertions, 9 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
index e25f0359..d5bb3c0b 100644
--- a/sos/plugins/__init__.py
+++ b/sos/plugins/__init__.py
@@ -496,9 +496,9 @@ class Plugin(object):
"""Run a program and collect the output"""
self.collect_cmds.append( (exe, suggest_filename, root_symlink, timeout) )
- def get_cmd_dir(self):
- """Return a directory into which this module should store
- collected command output"""
+ def get_cmd_path(self):
+ """Return a path into which this module should store collected
+ command output"""
return os.path.join(self.archive.get_tmp_dir(),
'sos_commands', self.name())
diff --git a/sos/plugins/cloudforms.py b/sos/plugins/cloudforms.py
index d72dc42b..9f1721fd 100644
--- a/sos/plugins/cloudforms.py
+++ b/sos/plugins/cloudforms.py
@@ -30,9 +30,9 @@ class Cloudforms(Plugin, RedHatPlugin):
katello_debug = "/usr/share/katello/script/katello-debug"
aeolus_debug = "aeolus-debug"
if os.path.isfile(katello_debug):
- katello_debug_path = os.path.join(self.get_cmd_dir(), "katello-debug")
+ katello_debug_path = os.path.join(self.get_cmd_path(), "katello-debug")
self.add_cmd_output("%s --notar -d %s" % (katello_debug, katello_debug_path))
if os.path.isfile(aeolus_debug):
- aeolus_debug_path = os.path.join(self.get_cmd_dir(), "aeolus-debug")
+ aeolus_debug_path = os.path.join(self.get_cmd_path(), "aeolus-debug")
self.add_cmd_output("%s --notar -d %s" % (aeolus_debug, aeolus_debug_path))
diff --git a/sos/plugins/lvm2.py b/sos/plugins/lvm2.py
index a78642a0..1a4d5896 100644
--- a/sos/plugins/lvm2.py
+++ b/sos/plugins/lvm2.py
@@ -34,7 +34,7 @@ class Lvm2(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
if metadata:
lvmdump_opts = "-a -m"
cmd = lvmdump_cmd % (lvmdump_opts,
- os.path.join(self.get_cmd_dir(), "lvmdump"))
+ os.path.join(self.get_cmd_path(), "lvmdump"))
self.add_cmd_output(cmd)
def setup(self):
diff --git a/sos/plugins/rhui.py b/sos/plugins/rhui.py
index 9bf29590..a291515f 100644
--- a/sos/plugins/rhui.py
+++ b/sos/plugins/rhui.py
@@ -32,7 +32,7 @@ class Rhui(Plugin, RedHatPlugin):
else:
cds = ""
- rhui_debug_dst_path = os.path.join(self.get_cmd_dir(),
+ rhui_debug_dst_path = os.path.join(self.get_cmd_path(),
self.commons['cmddir'], self.name())
try:
os.mkdir(rhui_debug_dst_path)
diff --git a/sos/plugins/satellite.py b/sos/plugins/satellite.py
index 75c047fc..7f4aafd3 100644
--- a/sos/plugins/satellite.py
+++ b/sos/plugins/satellite.py
@@ -78,7 +78,7 @@ class Satellite(Plugin, RedHatPlugin):
"/etc/tomcat6/", "/var/log/tomcat6/"])
if os.path.exists("spacewalk-debug"):
self.add_cmd_output("spacewalk-debug --dir %s"
- % os.path.join(self.get_cmd_dir()))
+ % os.path.join(self.get_cmd_path()))
if self.proxy:
self.add_copy_specs(["/etc/squid", "/var/log/squid"])
diff --git a/sos/plugins/selinux.py b/sos/plugins/selinux.py
index 9732873e..daa1bf77 100644
--- a/sos/plugins/selinux.py
+++ b/sos/plugins/selinux.py
@@ -34,7 +34,7 @@ class SELinux(Plugin, RedHatPlugin):
self.add_cmd_output("selinuxconlist root")
self.add_cmd_output("selinuxexeccon /bin/passwd")
self.add_cmd_output("ausearch -m avc,user_avc -ts today")
- semanage_custom_dest = join(self.get_cmd_dir(),
+ semanage_custom_dest = join(self.get_cmd_path(),
"selinux.custom")
self.add_cmd_output("semanage -o %s" % semanage_custom_dest)
if self.get_option('fixfiles'):