aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlice Ferrazzi <alicef@gentoo.org>2017-07-07 08:13:19 +0900
committerAlice Ferrazzi <alicef@gentoo.org>2017-07-07 08:13:19 +0900
commit4ab11b7005db26bbb970aebd7c738018a4a04cde (patch)
tree0bec49f18aaf5ee3552e7370437bd1b40fc68416
parentmade function for subprocess popen (diff)
downloadelivepatch-4ab11b7005db26bbb970aebd7c738018a4a04cde.tar.gz
elivepatch-4ab11b7005db26bbb970aebd7c738018a4a04cde.tar.bz2
elivepatch-4ab11b7005db26bbb970aebd7c738018a4a04cde.zip
added docstring
-rw-r--r--elivepatch_server/resources/livepatch.py16
1 files 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)