From 4ab11b7005db26bbb970aebd7c738018a4a04cde Mon Sep 17 00:00:00 2001 From: Alice Ferrazzi Date: Fri, 7 Jul 2017 08:13:19 +0900 Subject: added docstring --- elivepatch_server/resources/livepatch.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/elivepatch_server/resources/livepatch.py b/elivepatch_server/resources/livepatch.py index bcd4e4e..5daad7f 100644 --- a/elivepatch_server/resources/livepatch.py +++ b/elivepatch_server/resources/livepatch.py @@ -73,10 +73,11 @@ class PaTch(object): # -c ../elivepatch/elivepatch_server/config --skip-gcc-check def build_livepatch(self, kernel_source, vmlinux): """ - - :param kernel_source: - :param vmlinux: - :return: + Function for building the livepatch + + :param kernel_source: directory of the kernel source + :param vmlinux: path to the vmlinux file + :return: void """ debug=True bashCommand = ['sudo','kpatch-build'] @@ -100,6 +101,13 @@ class PaTch(object): self.command(['sudo','emerge','-q','"=sys-kernel/gentoo-sources-'+kernel_version+'"']) def command(self, bashCommand, kernel_source_dir=None): + """ + Popen override function + + :param bashCommand: List of command arguments to execute + :param kernel_source_dir: the source directory of the kernel + :return: void + """ if kernel_source_dir: print(bashCommand) process = subprocess.Popen(bashCommand, stdout=subprocess.PIPE, cwd=kernel_source_dir) -- cgit v1.2.3-65-gdbad