diff options
author | Jeff Lane <jeffrey.lane@canonical.com> | 2020-06-15 11:48:47 -0400 |
---|---|---|
committer | Jeff Lane <jeffrey.lane@canonical.com> | 2020-06-15 11:48:47 -0400 |
commit | 1c645428a44bf527e58366480f2e6c0f1e144725 (patch) | |
tree | ee6809631e9f50eb83dc9a78eb2cc963b4be2f29 /bin | |
parent | 9fa70325700b81be54368f66a3e9791d7619fc91 (diff) |
PEP8 compliance fixes
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/kernel_taint_test | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/kernel_taint_test b/bin/kernel_taint_test index bcdc589b..cbceaf6b 100755 --- a/bin/kernel_taint_test +++ b/bin/kernel_taint_test @@ -49,6 +49,7 @@ def find_taints(taint_file): print("Kernel taint value is {}".format(taints)) return(taints) + def get_modules(): lsmod_output = check_output('lsmod', universal_newlines=True).split('\n') # get only the module names @@ -58,6 +59,7 @@ def get_modules(): modules.append(line.split()[0]) return(modules) + def print_out_of_tree_modules(modules): print(" Modules not in-tree:") for mod in modules: @@ -66,6 +68,7 @@ def print_out_of_tree_modules(modules): universal_newlines=True): print(" %s" % mod) + def print_GPL_incompatible_modules(modules): print(" Modules with GPL Incompatible Licenses:") for mod in modules: @@ -76,7 +79,6 @@ def print_GPL_incompatible_modules(modules): print(" %s: %s" % (mod, license)) - def report_failures(taints): """Report the failure code and its meaning(s).""" # Below meaning strings are taken from @@ -103,9 +105,9 @@ def report_failures(taints): if (taints & (2 ** i)): modules = get_modules() print("Taint bit value: {} ({})".format(i, taint_meanings[i])) - if i == 0: # List GPL incompatible modules and licenses + if i == 0: # List GPL incompatible modules and licenses print_GPL_incompatible_modules(modules) - if i == 12: # List out-of-tree modules + if i == 12: # List out-of-tree modules print_out_of_tree_modules(modules) if taints == 0: print("No kernel taints detected.") |