diff options
-rw-r--r-- | elivepatch_server/resources/livepatch.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/elivepatch_server/resources/livepatch.py b/elivepatch_server/resources/livepatch.py index 8ea47e2..efa180e 100644 --- a/elivepatch_server/resources/livepatch.py +++ b/elivepatch_server/resources/livepatch.py @@ -15,9 +15,6 @@ class PaTch(object): def __init__(self): pass - # kpatch-build/kpatch-build -s /usr/src/linux-4.9.16-gentoo/ - # -v /usr/src/linux-4.9.16-gentoo/vmlinux examples/test.patch - # -c ../elivepatch/elivepatch_server/config --skip-gcc-check def build_livepatch(self, uuid, vmlinux, debug=True): """ Function for building the livepatch @@ -113,9 +110,11 @@ def command(bashCommand, kernel_source_dir=None, env=None): print(bashCommand) process = subprocess.Popen(bashCommand, stdout=subprocess.PIPE, cwd=kernel_source_dir, env=env) output, error = process.communicate() - print(output) + for output_line in output.split(b'\n'): + print(output_line.strip()) else: print(bashCommand) process = subprocess.Popen(bashCommand, stdout=subprocess.PIPE, env=env) output, error = process.communicate() - print(output) + for output_line in output.split(b'\n'): + print(output_line.strip()) |