Blame SOURCES/sos-bz997083-Fix-policy-classes-for--tmp-dir.patch

6b17e9
commit 420f6ee7a25833ebaaea224fc0955cacdecdd6c2
6b17e9
Author: Bryn M. Reeves <bmr@redhat.com>
6b17e9
Date:   Mon Jun 10 20:32:20 2013 +0100
6b17e9
6b17e9
    Fix policy classes for --tmp-dir
6b17e9
    
6b17e9
    Policy classes need to return the user-supplied temporary
6b17e9
    directory if they decide not to override it.
6b17e9
    
6b17e9
    Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
6b17e9
6b17e9
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
6b17e9
index 752d480..983842d 100644
6b17e9
--- a/sos/policies/__init__.py
6b17e9
+++ b/sos/policies/__init__.py
6b17e9
@@ -190,6 +190,7 @@ No changes will be made to system configuration.
6b17e9
     def get_tmp_dir(self, opt_tmp_dir):
6b17e9
         if not opt_tmp_dir:
6b17e9
             return tempfile.gettempdir()
6b17e9
+        return opt_tmp_dir
6b17e9
 
6b17e9
     def validatePlugin(self, plugin_class):
6b17e9
         """
6b17e9
diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py
6b17e9
index c3740dc..9321815 100644
6b17e9
--- a/sos/policies/redhat.py
6b17e9
+++ b/sos/policies/redhat.py
6b17e9
@@ -85,6 +85,7 @@ class RedHatPolicy(LinuxPolicy):
6b17e9
     def get_tmp_dir(self, opt_tmp_dir):
6b17e9
         if not opt_tmp_dir:
6b17e9
             return self._tmp_dir
6b17e9
+        return opt_tmp_dir
6b17e9
 
6b17e9
     def get_local_name(self):
6b17e9
         return self.host_name()