代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/scap-security-guide 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 27dc7ecafe8ab5c2e0bbbb2fcdc399bece5c250e Mon Sep 17 00:00:00 2001
From: Vojtech Polasek <vpolasek@redhat.com>
Date: Mon, 8 Jun 2020 12:02:16 +0200
Subject: [PATCH] fix python imports of ElementTree
Signed-off-by: HuaxinLu <luhuaxin1@huawei.com>
---
shared/transforms/pcidss/transform_benchmark_to_pcidss.py | 5 ++++-
ssg/xml.py | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/shared/transforms/pcidss/transform_benchmark_to_pcidss.py b/shared/transforms/pcidss/transform_benchmark_to_pcidss.py
index 3023e0435f..0ceaf727d3 100755
--- a/shared/transforms/pcidss/transform_benchmark_to_pcidss.py
+++ b/shared/transforms/pcidss/transform_benchmark_to_pcidss.py
@@ -20,7 +20,10 @@
# Martin Preisler <mpreisle@redhat.com>
import logging
-from xml.etree import cElementTree as ElementTree
+try:
+ from xml.etree import cElementTree as ElementTree
+except ImportError:
+ from xml.etree import ElementTree as ElementTree
import json
import sys
import os
diff --git a/ssg/xml.py b/ssg/xml.py
index 736875a9d2..71c1381c23 100644
--- a/ssg/xml.py
+++ b/ssg/xml.py
@@ -9,7 +9,7 @@ from .constants import xml_version, oval_header, timestamp, PREFIX_TO_NS
try:
from xml.etree import cElementTree as ElementTree
except ImportError:
- import cElementTree as ElementTree
+ from xml.etree import ElementTree as ElementTree
def oval_generated_header(product_name, schema_version, ssg_version):
--
2.30.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。