scripts/build-kernel: re-format with black

For consistent-formatting of Python scripts.
This commit is contained in:
Albert Hopkins 2018-12-01 18:08:02 -08:00
parent 339b3dd2e3
commit 8f79ddc951
1 changed files with 13 additions and 6 deletions

View File

@ -78,17 +78,24 @@ def install_kernel():
makeopts = os.environ.get("MAKEOPTS", "")
subprocess.check_call(
["make", "-C", "/usr/src/linux", "MAKEOPTS=" + makeopts, "install", "modules_install"]
[
"make",
"-C",
"/usr/src/linux",
"MAKEOPTS=" + makeopts,
"install",
"modules_install",
]
)
# create the symlink. /sbin/installkernel claims this is not used on
# "modern" distributions and doesn't create it (unless it already
# exists). I still do this however.
for filename in os.listdir('/boot'):
if filename.startswith('vmlinuz-'):
if os.path.lexists('/boot/vmlinuz'):
os.unlink('/boot/vmlinuz')
os.symlink(filename, '/boot/vmlinuz')
for filename in os.listdir("/boot"):
if filename.startswith("vmlinuz-"):
if os.path.lexists("/boot/vmlinuz"):
os.unlink("/boot/vmlinuz")
os.symlink(filename, "/boot/vmlinuz")
break