diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2019-02-01 09:36:06 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2019-02-07 11:46:50 +0000 |
commit | 33054e81f50d501f1352028a5c4b44f785d7d9b7 (patch) | |
tree | d870fe3144b2c407aa47dd620bb7df293b080bcb | |
parent | ed8c59e9fd6adcfc8f00a05e68d07deb98252053 (diff) | |
download | sos-33054e81f50d501f1352028a5c4b44f785d7d9b7.tar.gz |
[general] fix pycodestyle indentation errors
Resolves: #1556
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r-- | sos/plugins/__init__.py | 16 | ||||
-rw-r--r-- | sos/plugins/filesys.py | 6 | ||||
-rw-r--r-- | sos/sosreport.py | 14 | ||||
-rw-r--r-- | sos/utilities.py | 4 |
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 |