aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Jaggars <jjaggars@redhat.com>2012-03-02 14:04:44 -0600
committerJesse Jaggars <jjaggars@redhat.com>2012-03-02 14:10:01 -0600
commit83c6e09756bd228dc76e7a84646de5a9f5b5e694 (patch)
tree8e2e699cc338d011739d6de9498fbc4db6f38bb5
parentc903157056c629589428ee167eda50bbd93e97da (diff)
downloadsos-83c6e09756bd228dc76e7a84646de5a9f5b5e694.tar.gz
converting self.files and self.packages to list to protect against accidental tuple misunderstandings
-rw-r--r--sos/plugins/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
index 436591d1..010d404f 100644
--- a/sos/plugins/__init__.py
+++ b/sos/plugins/__init__.py
@@ -514,6 +514,12 @@ class Plugin(object):
"""
# some files or packages have been specified for this package
if self.files or self.packages:
+ if isinstance(self.files, basestring):
+ self.files = [self.files]
+
+ if isinstance(self.packages, basestring):
+ self.packages = [self.packages]
+
return (any(os.path.exists(fname) for fname in self.files) or
any(self.isInstalled(pkg) for pkg in self.packages))
return True