代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/scap-security-guide 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From b0adc1d53780def4a95e310b6d26bb91ee97177e Mon Sep 17 00:00:00 2001
From: Vojtech Polasek <vpolasek@redhat.com>
Date: Mon, 8 Jun 2020 13:27:41 +0200
Subject: [PATCH] fix deprecated getiterator function
Signed-off-by: HuaxinLu <luhuaxin1@huawei.com>
---
ssg/build_cpe.py | 6 +++---
ssg/id_translate.py | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/ssg/build_cpe.py b/ssg/build_cpe.py
index 2e5d24a5da..8c046777a5 100644
--- a/ssg/build_cpe.py
+++ b/ssg/build_cpe.py
@@ -17,7 +17,7 @@ def extract_subelement(objects, sub_elem_type):
"""
for obj in objects:
- for subelement in obj.getiterator():
+ for subelement in obj.iter():
if subelement.get(sub_elem_type):
sub_element = subelement.get(sub_elem_type)
return sub_element
@@ -44,12 +44,12 @@ def extract_referred_nodes(tree_with_refs, tree_with_ids, attrname):
reflist = []
elementlist = []
- for element in tree_with_refs.getiterator():
+ for element in tree_with_refs.iter():
value = element.get(attrname)
if value is not None:
reflist.append(value)
- for element in tree_with_ids.getiterator():
+ for element in tree_with_ids.iter():
if element.get("id") in reflist:
elementlist.append(element)
diff --git a/ssg/id_translate.py b/ssg/id_translate.py
index 72b07be181..ba92259049 100644
--- a/ssg/id_translate.py
+++ b/ssg/id_translate.py
@@ -64,7 +64,7 @@ class IDTranslator(object):
)
def translate(self, tree, store_defname=False):
- for element in tree.getiterator():
+ for element in tree.iter():
idname = element.get("id")
if idname:
# store the old name if requested (for OVAL definitions)
--
2.30.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。