0 Star 0 Fork 58

eaglegai/dnf

forked from src-openEuler/dnf 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Prevent-traceback-catch-ValueError-if-pkg-is-from-cmdline.patch 827 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 643780709fbc62a58da3f71d32ee3e7399a8cdcc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= <amatej@redhat.com>
Date: Mon, 29 Mar 2021 09:26:16 +0200
Subject: [PATCH] Prevent traceback (catch ValueError) if pkg is from cmdline
---
dnf/cli/cli.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py
index c2c04c9..6576997 100644
--- a/dnf/cli/cli.py
+++ b/dnf/cli/cli.py
@@ -292,7 +292,7 @@ class BaseCli(dnf.Base):
fn = lambda x, y, z: self.output.userconfirm()
try:
self._get_key_for_package(po, fn)
- except dnf.exceptions.Error as e:
+ except (dnf.exceptions.Error, ValueError) as e:
error_messages.append(str(e))
else:
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/eaglegai/dnf.git
git@gitee.com:eaglegai/dnf.git
eaglegai
dnf
dnf
master

搜索帮助