1 Star 0 Fork 97

王策/anaconda

forked from src-openEuler/anaconda 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
bugfix-Fix-traceback-when-starting-installation-with-inst.c.patch 1.28 KB
一键复制 编辑 原始数据 按行查看 历史
xuxiaolong 提交于 2021-04-02 10:25 . sync 49 fixbug from github
From 0f9873a2ffbf3a180a236c4f036e54520773f2ca Mon Sep 17 00:00:00 2001
From: Jiri Konecny <jkonecny@redhat.com>
Date: Tue, 22 Sep 2020 16:28:48 +0200
Subject: [PATCH] Fix traceback when starting installation with inst.console
(no args)
None is the default value which would fail on os.path.basename call.
---
pyanaconda/modules/storage/bootloader/base.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/modules/storage/bootloader/base.py b/pyanaconda/modules/storage/bootloader/base.py
index b1122287a..a8eb26cc7 100644
--- a/pyanaconda/modules/storage/bootloader/base.py
+++ b/pyanaconda/modules/storage/bootloader/base.py
@@ -903,10 +903,16 @@ class BootLoader(object):
def _set_console(self):
""" Set console options based on boot arguments. """
- console = kernel_arguments.get("console", "")
+ console = kernel_arguments.get("console")
+
+ if not console:
+ return
+
console = os.path.basename(console)
self.console, _x, self.console_options = console.partition(",")
+ log.debug("Console is set to %s with options '%s'", self.console, self.console_options)
+
def write_config_console(self, config):
"""Write console-related configuration lines."""
pass
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangce1988/anaconda.git
git@gitee.com:wangce1988/anaconda.git
wangce1988
anaconda
anaconda
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385