Created
December 2, 2021 16:47
-
-
Save abadger/615c9d85a201c3f61c6673172e3a7b46 to your computer and use it in GitHub Desktop.
Example of easy porting of run_suprocess to use a list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/convert2rhel/checks.py b/convert2rhel/checks.py | |
index 1bb5dff..ebe481f 100644 | |
--- a/convert2rhel/checks.py | |
+++ b/convert2rhel/checks.py | |
@@ -105,7 +105,7 @@ def check_tainted_kmods(): | |
system76_io 16384 0 - Live 0x0000000000000000 (OE) <<<<<< Tainted | |
system76_acpi 16384 0 - Live 0x0000000000000000 (OE) <<<<< Tainted | |
""" | |
- unsigned_modules, _ = run_subprocess("grep '(' /proc/modules") | |
+ unsigned_modules, _ = run_subprocess(["grep", "('", "/proc/modules"]) | |
module_names = "\n ".join([mod.split(" ")[0] for mod in unsigned_modules.splitlines()]) | |
if unsigned_modules: | |
logger.critical( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment