Blob Blame History Raw
commit 420f6ee7a25833ebaaea224fc0955cacdecdd6c2
Author: Bryn M. Reeves <bmr@redhat.com>
Date:   Mon Jun 10 20:32:20 2013 +0100

    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>

diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
index 752d480..983842d 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 c3740dc..9321815 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()