Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-spd
Commits
91ee7958
Commit
91ee7958
authored
Dec 12, 2023
by
xiao-hesheng
Browse files
修改脚本适合融合环境
parent
e33e0f35
Changes
1
Hide whitespace changes
Inline
Side-by-side
common/fileUtls.py
View file @
91ee7958
...
@@ -39,7 +39,11 @@ class FileUtils(object):
...
@@ -39,7 +39,11 @@ class FileUtils(object):
def
r_info2
(
self
,
module
,
keyname
):
def
r_info2
(
self
,
module
,
keyname
):
w_path
=
rootPath
+
os
.
sep
+
'data'
+
os
.
sep
+
module
w_path
=
rootPath
+
os
.
sep
+
'data'
+
os
.
sep
+
module
yamlpath
=
os
.
path
.
join
(
w_path
,
"message2"
)
yamlpath
=
os
.
path
.
join
(
w_path
,
"message2"
)
file_value
=
open
(
yamlpath
,
'r'
,
encoding
=
'utf-8'
)
try
:
file_value
=
open
(
yamlpath
,
'r'
,
encoding
=
'utf-8'
)
except
:
file_value
=
open
(
yamlpath
,
'w'
,
encoding
=
'utf-8'
)
file_value
=
open
(
yamlpath
,
'r'
,
encoding
=
'utf-8'
)
result
=
yaml
.
load
(
file_value
.
read
(),
Loader
=
yaml
.
Loader
)
result
=
yaml
.
load
(
file_value
.
read
(),
Loader
=
yaml
.
Loader
)
if
result
is
not
None
:
if
result
is
not
None
:
key
=
keyname
key
=
keyname
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment