!9 [sync] PR-5: fix out of range bug
From: @openeuler-sync-bot Reviewed-by: @gaoruoshu Signed-off-by: @gaoruoshu
This commit is contained in:
commit
2e3765a33c
25
0001-fix-bug-list-index-out-of-range-in-virtualbox.patch
Normal file
25
0001-fix-bug-list-index-out-of-range-in-virtualbox.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 4cb49adb623f36590f254b7e11c8aa5b0777bd00 Mon Sep 17 00:00:00 2001
|
||||
From: gaoruoshu <gaoruoshu@huawei.com>
|
||||
Date: Tue, 26 Apr 2022 02:01:27 +0000
|
||||
Subject: [PATCH] fix bug: list index out of range in virtualbox
|
||||
|
||||
---
|
||||
atune_collector/plugin/monitor/memory/bandwidth.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/atune_collector/plugin/monitor/memory/bandwidth.py b/atune_collector/plugin/monitor/memory/bandwidth.py
|
||||
index 593a4a8..f44925f 100755
|
||||
--- a/atune_collector/plugin/monitor/memory/bandwidth.py
|
||||
+++ b/atune_collector/plugin/monitor/memory/bandwidth.py
|
||||
@@ -153,7 +153,7 @@ class MemBandwidth(Monitor):
|
||||
info = json.loads(info_json)
|
||||
|
||||
dimms = [[0 for i in range(8)] for i in range(8)]
|
||||
- if "children" not in info["memorys"][0]:
|
||||
+ if info["memorys"] is None or len(info["memorys"]) == 0 or "children" not in info["memorys"][0]:
|
||||
return 0
|
||||
for dimm in info["memorys"][0]["children"]:
|
||||
if dimm.get("size") is None:
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -2,12 +2,14 @@
|
||||
|
||||
Name: atune-collector
|
||||
Version: 1.1.0
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: A-Tune-Collector is used to collect various system resources.
|
||||
License: Mulan PSL v2
|
||||
URL: https://gitee.com/openeuler/A-Tune-Collector
|
||||
Source: https://gitee.com/openeuler/A-Tune-Collector/repository/archive/v%{version}.tar.gz
|
||||
|
||||
Patch0: 0001-fix-bug-list-index-out-of-range-in-virtualbox.patch
|
||||
|
||||
BuildRequires: python3-setuptools
|
||||
Requires: python3-dict2xml
|
||||
|
||||
@ -31,6 +33,9 @@ The A-Tune-Collector is used to collect various system resources and can also be
|
||||
%attr(0600,root,root) %{_sysconfdir}/atune_collector/*
|
||||
|
||||
%changelog
|
||||
* Thu Mar 09 2023 zhangjian <zhang_jian7@hoperun.com> - 1.1.0-2
|
||||
- fix bug: list index out of range in virtualbox
|
||||
|
||||
* Thu Nov 11 2021 hanxinke <hanxinke@huawei.com> - 1.1.0-1
|
||||
- upgrade to v1.1.0
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user