aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/plugins/__init__.py16
-rw-r--r--sos/plugins/filesys.py6
-rw-r--r--sos/sosreport.py14
-rw-r--r--sos/utilities.py4
4 files changed, 20 insertions, 20 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
index 6c3b153e..47b028a8 100644
--- a/sos/plugins/__init__.py
+++ b/sos/plugins/__init__.py
@@ -1045,16 +1045,16 @@ class Plugin(object):
return True
def _check_plugin_triggers(self, files, packages, commands, services):
- kernel_mods = self.policy.lsmod()
+ kernel_mods = self.policy.lsmod()
- def have_kmod(kmod):
- return kmod in kernel_mods
+ def have_kmod(kmod):
+ return kmod in kernel_mods
- return (any(os.path.exists(fname) for fname in files) or
- any(self.is_installed(pkg) for pkg in packages) or
- any(is_executable(cmd) for cmd in commands) or
- any(have_kmod(kmod) for kmod in self.kernel_mods) or
- any(self.is_service(svc) for svc in services))
+ return (any(os.path.exists(fname) for fname in files) or
+ any(self.is_installed(pkg) for pkg in packages) or
+ any(is_executable(cmd) for cmd in commands) or
+ any(have_kmod(kmod) for kmod in self.kernel_mods) or
+ any(self.is_service(svc) for svc in services))
def default_enabled(self):
"""This decides whether a plugin should be automatically loaded or
diff --git a/sos/plugins/filesys.py b/sos/plugins/filesys.py
index 3a721067..7ad24402 100644
--- a/sos/plugins/filesys.py
+++ b/sos/plugins/filesys.py
@@ -50,10 +50,10 @@ class Filesys(Plugin, DebianPlugin, UbuntuPlugin):
mounts = '/proc/mounts'
ext_fs_regex = r"^(/dev/.+).+ext[234]\s+"
for dev in self.do_regex_find_all(ext_fs_regex, mounts):
- self.add_cmd_output("dumpe2fs %s %s" % (dumpe2fs_opts, dev))
+ self.add_cmd_output("dumpe2fs %s %s" % (dumpe2fs_opts, dev))
- if self.get_option('frag'):
- self.add_cmd_output("e2freefrag %s" % (dev))
+ if self.get_option('frag'):
+ self.add_cmd_output("e2freefrag %s" % (dev))
def postproc(self):
self.do_file_sub(
diff --git a/sos/sosreport.py b/sos/sosreport.py
index 97bee10c..b4a6b84a 100644
--- a/sos/sosreport.py
+++ b/sos/sosreport.py
@@ -1307,11 +1307,11 @@ class SoSReport(object):
return digest.hexdigest()
def _write_checksum(self, archive, hash_name, checksum):
- # store checksum into file
- fp = open(archive + "." + hash_name, "w")
- if checksum:
- fp.write(checksum + "\n")
- fp.close()
+ # store checksum into file
+ fp = open(archive + "." + hash_name, "w")
+ if checksum:
+ fp.write(checksum + "\n")
+ fp.close()
def final_work(self):
# This must come before archive creation to ensure that log
@@ -1355,8 +1355,8 @@ class SoSReport(object):
os.rename(directory, final_dir)
directory = final_dir
except (OSError, IOError):
- print(_("Error moving directory: %s" % directory))
- return False
+ print(_("Error moving directory: %s" % directory))
+ return False
checksum = None
diff --git a/sos/utilities.py b/sos/utilities.py
index f539e71a..353a5a0f 100644
--- a/sos/utilities.py
+++ b/sos/utilities.py
@@ -117,9 +117,9 @@ def sos_get_command_output(command, timeout=300, stderr=False,
# the enclosing scope).
def _child_prep_fn():
if (chroot):
- os.chroot(chroot)
+ os.chroot(chroot)
if (chdir):
- os.chdir(chdir)
+ os.chdir(chdir)
cmd_env = os.environ.copy()
# ensure consistent locale for collected command output