Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
funasr_web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 368f821e
authored
Aug 22, 2024
by
‘chizw’
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]配置更改
1 parent
e6c5fd9e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
2 deletions
config/config.py
config/config.py
View file @
368f821
...
...
@@ -2,14 +2,13 @@ import sys
from
log.logger
import
log
import
os
def
extract_sys_param
(
param_name
,
default_value
):
def
extract_sys_param
(
param_name
,
default_value
=
None
):
env_index
=
None
for
i
,
arg
in
enumerate
(
sys
.
argv
):
if
arg
==
f
"--{param_name}"
:
env_index
=
i
break
# 提取 --env 参数的值
if
env_index
is
not
None
and
env_index
+
1
<
len
(
sys
.
argv
):
env_value
=
sys
.
argv
[
env_index
+
1
]
print
(
f
"Environment extract_param {param_name}: {env_value}"
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment