1 Star 0 Fork 7

卫亚平/A-Tune-Collector

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fix-bug-list-index-out-of-range-in-virtualbox.patch 1.00 KB
一键复制 编辑 原始数据 按行查看 历史
gaoruoshu 提交于 2023-08-01 09:43 +08:00 . feature: enable application configs
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 03/11] 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.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/weiyp2016/A-Tune-Collector.git
git@gitee.com:weiyp2016/A-Tune-Collector.git
weiyp2016
A-Tune-Collector
A-Tune-Collector
master

搜索帮助