提交 8338f6f8 编写于 作者: D deveco_test

修复缺陷扫描问题

Signed-off-by: Ndeveco_test <liguangjie1@huawei.com>
上级 c4016c09
......@@ -180,7 +180,6 @@ def _get_test_sources(config, testcases_dirs):
# get test sources from config.testfile
if getattr(config, "testfile", ""):
test_file = _get_test_file(config, testcases_dirs)
import stat
flags = os.O_RDONLY
modes = stat.S_IWUSR | stat.S_IRUSR
with os.fdopen(os.open(test_file, flags, modes), "r") as file_content:
......
......@@ -351,7 +351,7 @@ class MountKit(ITestKit):
try:
os.remove(os.path.join(remote_info.get("dir"),
os.path.basename(_file)))
except Exception as _:
except OSError as _:
pass
shutil.copy(_file, remote_info.get("dir"))
if check_server_file(_file, remote_info.get("dir")):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册