1 Star 0 Fork 105

王策/anaconda

forked from src-openEuler/anaconda 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
bugfix-Fix-crash-on-first-entering-of-source-spoke.patch 1.84 KB
一键复制 编辑 原始数据 按行查看 历史
xuxiaolong 提交于 2021-04-02 10:25 . sync 49 fixbug from github
From c3dbffacabc60f0149b142a1f6b3f29739e9288b Mon Sep 17 00:00:00 2001
From: Jiri Konecny <jkonecny@redhat.com>
Date: Mon, 27 Jul 2020 18:13:30 +0200
Subject: [PATCH] Fix crash on first entering of source spoke
This is called by removing treeinfo repositories which happens thanks to the
initialization of the spoke and selecting first line. Just let everything go
because the repository is added later again (or at least it seems to be working
like that).
Related: rhbz#1851207
(cherry picked from commit 5136a4f961c98fec373033027502fba8b409c04d)
---
pyanaconda/ui/gui/spokes/installation_source.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/installation_source.py b/pyanaconda/ui/gui/spokes/installation_source.py
index 0bd3b6938..7ed95c51d 100644
--- a/pyanaconda/ui/gui/spokes/installation_source.py
+++ b/pyanaconda/ui/gui/spokes/installation_source.py
@@ -1639,10 +1639,12 @@ class SourceSpoke(NormalSpoke, GUISpokeInputCheckHandler, SourceSwitchHandler):
# Remove the input validation checks for this repo
repo = self._repo_store[itr][REPO_OBJ]
- self.remove_check(self._repo_checks[repo.repo_id].name_check)
- self.remove_check(self._repo_checks[repo.repo_id].url_check)
- self.remove_check(self._repo_checks[repo.repo_id].proxy_check)
- del self._repo_checks[repo.repo_id]
+ # avoid crash when the source is changed because of initialization
+ if repo.repo_id in self._repo_checks:
+ self.remove_check(self._repo_checks[repo.repo_id].name_check)
+ self.remove_check(self._repo_checks[repo.repo_id].url_check)
+ self.remove_check(self._repo_checks[repo.repo_id].proxy_check)
+ del self._repo_checks[repo.repo_id]
self._repo_store.remove(itr)
if len(self._repo_store) == 0:
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangce1988/anaconda.git
git@gitee.com:wangce1988/anaconda.git
wangce1988
anaconda
anaconda
master

搜索帮助