fix unboundlocalerror with variable name log
(cherry picked from commit 9fdd92836f8f96d482280b0cdad4f5fb0470f97a)
This commit is contained in:
parent
3cc040877f
commit
001e565057
29
0001-fix-unboundlocalerror-with-variable-name-log.patch
Normal file
29
0001-fix-unboundlocalerror-with-variable-name-log.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From 75fec4829ff33c6e0b6e306bb3b730a7527fd352 Mon Sep 17 00:00:00 2001
|
||||||
|
From: rabbitali <wenxin32@foxmail.com>
|
||||||
|
Date: Tue, 12 Dec 2023 11:04:06 +0800
|
||||||
|
Subject: [PATCH 1/1] fix unboundlocalerror with variable name log
|
||||||
|
|
||||||
|
---
|
||||||
|
ceres/manages/vulnerability_manage.py | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ceres/manages/vulnerability_manage.py b/ceres/manages/vulnerability_manage.py
|
||||||
|
index 0b6fb88..038c68d 100644
|
||||||
|
--- a/ceres/manages/vulnerability_manage.py
|
||||||
|
+++ b/ceres/manages/vulnerability_manage.py
|
||||||
|
@@ -664,10 +664,10 @@ class VulnerabilityManage:
|
||||||
|
try:
|
||||||
|
hotpatch_name = rpm.rsplit(".", 1)[0].split("-", 1)[1]
|
||||||
|
_, hotpatch_status_set_log = self._set_hotpatch_status_by_dnf_plugin(hotpatch_name, "accept")
|
||||||
|
- log += f"\n\n{hotpatch_status_set_log}"
|
||||||
|
+ tmp["log"] += f"\n\n{hotpatch_status_set_log}"
|
||||||
|
except IndexError as error:
|
||||||
|
LOGGER.error(error)
|
||||||
|
- log += f"\n\nhotpatch status set failed due to can't get correct hotpatch name!"
|
||||||
|
+ tmp["log"] += f"\n\nhotpatch status set failed due to can't get correct hotpatch name!"
|
||||||
|
package_update_info.append(tmp)
|
||||||
|
return final_fix_result, package_update_info, upgrade_count
|
||||||
|
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
Name: aops-ceres
|
Name: aops-ceres
|
||||||
Version: v1.4.0
|
Version: v1.4.0
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: An agent which needs to be adopted in client, it managers some plugins, such as gala-gopher(kpi collection), fluentd(log collection) and so on.
|
Summary: An agent which needs to be adopted in client, it managers some plugins, such as gala-gopher(kpi collection), fluentd(log collection) and so on.
|
||||||
License: MulanPSL2
|
License: MulanPSL2
|
||||||
URL: https://gitee.com/openeuler/%{name}
|
URL: https://gitee.com/openeuler/%{name}
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
|
Patch0001: 0001-fix-unboundlocalerror-with-variable-name-log.patch
|
||||||
|
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
Requires: python3-requests python3-jsonschema python3-libconf
|
Requires: python3-requests python3-jsonschema python3-libconf
|
||||||
@ -35,7 +35,7 @@ Requires: perf
|
|||||||
da-tool is a sampling and analysis tool for function delay.
|
da-tool is a sampling and analysis tool for function delay.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{version}
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
|
|
||||||
# build for aops-ceres
|
# build for aops-ceres
|
||||||
@ -87,6 +87,9 @@ install -b -m500 ./extra-tools/da-tool/script/da-tool.sh ${RPM_BUILD_ROOT}
|
|||||||
%attr(0500, root, root) %{_bindir}/da-tool-analysis
|
%attr(0500, root, root) %{_bindir}/da-tool-analysis
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 12 2023 wenxin<wenxin32@foxmail.com> - v1.4.0-2
|
||||||
|
- fix unboundlocalerror with variable name log
|
||||||
|
|
||||||
* Tue Dec 12 2023 wenxin<wenxin32@foxmail.com> - v1.4.0-1
|
* Tue Dec 12 2023 wenxin<wenxin32@foxmail.com> - v1.4.0-1
|
||||||
- Change CVE rollback task to hotpatch remove
|
- Change CVE rollback task to hotpatch remove
|
||||||
- update cve scan method and cve fix method
|
- update cve scan method and cve fix method
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user