aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2013-06-10 20:32:20 +0100
committerBryn M. Reeves <bmr@redhat.com>2013-06-10 20:32:20 +0100
commitbc77b20f60354ab4dc20c259ef61410cd7c2d1f8 (patch)
tree221c51a62e48cf9d372574cea4f423e073891751
parentf81df25a32ff525f965a52581711ff06563166b5 (diff)
downloadsos-bc77b20f60354ab4dc20c259ef61410cd7c2d1f8.tar.gz
Fix policy classes for --tmp-dir
Policy classes need to return the user-supplied temporary directory if they decide not to override it. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/policies/__init__.py1
-rw-r--r--sos/policies/redhat.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
index 8eff9935..96d1acae 100644
--- a/sos/policies/__init__.py
+++ b/sos/policies/__init__.py
@@ -190,6 +190,7 @@ No changes will be made to system configuration.
def get_tmp_dir(self, opt_tmp_dir):
if not opt_tmp_dir:
return tempfile.gettempdir()
+ return opt_tmp_dir
def validatePlugin(self, plugin_class):
"""
diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py
index c3740dce..93218157 100644
--- a/sos/policies/redhat.py
+++ b/sos/policies/redhat.py
@@ -85,6 +85,7 @@ class RedHatPolicy(LinuxPolicy):
def get_tmp_dir(self, opt_tmp_dir):
if not opt_tmp_dir:
return self._tmp_dir
+ return opt_tmp_dir
def get_local_name(self):
return self.host_name()