1 Star 1 Fork 107

ctyunsystem/anaconda

forked from src-openEuler/anaconda 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
bugfix-Fix-kickstart-file-error-with-user-groups.patch 1.48 KB
一键复制 编辑 原始数据 按行查看 历史
xuxiaolong 提交于 2021-04-02 10:25 . sync 49 fixbug from github
From dac59c13424e403f73e3cad46e7412482b17f92a Mon Sep 17 00:00:00 2001
From: Kai Kang <kai.kang@windriver.com>
Date: Thu, 6 Aug 2020 17:09:25 +0800
Subject: [PATCH] Fix kickstart file error with user groups
When fill the "Group Membership" in "ADVANCED USER CONFIGURATION"
dialog with the provided example text:
wheel, my-team (1245), project-x (29935)
It keeps the spaces between group name(project-x) and group id('(29935)'),
and then write them to kickstart file. When boot anaconda with the kickstart
file, it fails with:
| unrecognzed arguments: (1245),project-x (29935)
Filter out the spaces between group name and group id to avoid such
issue.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
pyanaconda/ui/gui/spokes/user.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py
index 82fbdc8f8..05e01f8a6 100644
--- a/pyanaconda/ui/gui/spokes/user.py
+++ b/pyanaconda/ui/gui/spokes/user.py
@@ -157,7 +157,7 @@ class AdvancedUserDialog(GUIObject, GUIDialogInputCheckHandler):
self.user.gid = USER_GID_NOT_SET
# ''.split(',') returns [''] instead of [], which is not what we want
- self.user.groups = [g.strip() for g in self._tGroups.get_text().split(",") if g]
+ self.user.groups = [''.join(g.split()) for g in self._tGroups.get_text().split(",") if g]
# Send ready signal to main event loop
hubQ.send_ready(self.__class__.__name__, False)
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ctyunsystem/anaconda.git
git@gitee.com:ctyunsystem/anaconda.git
ctyunsystem
anaconda
anaconda
master

搜索帮助