Fix | 修复了 __spilt__ 时出现截断字符串的问题
This commit is contained in:
parent
716f735fe7
commit
8baf2d4d70
@ -1,5 +1,16 @@
|
||||
# lndl 0.3
|
||||
|
||||
## 0.3.13
|
||||
|
||||
- lndl-nuitka
|
||||
- 大概是最后一次 0.3 的更新了
|
||||
- 修复了带有 `__spilt__` 的时候参数错误
|
||||
- 应该是使用 `arg_value` 判断类型
|
||||
- 但实际上用了 `value`
|
||||
- 把 `is True` 改成了双层判断
|
||||
- `isinstance(value, bool)`
|
||||
- `if value:`
|
||||
|
||||
## 0.3.12
|
||||
|
||||
- `Options`
|
||||
|
@ -143,18 +143,19 @@ def gen_subprocess_args(
|
||||
nuitka_config = merge_cli_config(nuitka_config, get_cli_nuitka_args())
|
||||
|
||||
def parse_value(arg_name, arg_value) -> list:
|
||||
if isinstance(value, bool):
|
||||
if isinstance(arg_value, bool):
|
||||
warn(f"bool value is not supported in list config {arg_name}")
|
||||
return []
|
||||
elif isinstance(value, str):
|
||||
elif isinstance(arg_value, str):
|
||||
return [f"--{arg_name}={arg_value}"]
|
||||
else:
|
||||
return [f"--{arg_name}={arg_value[0]}={arg_value[1]}"]
|
||||
|
||||
for name, value in nuitka_config.items():
|
||||
if value is True:
|
||||
if isinstance(value, bool):
|
||||
# --<name>
|
||||
cmd_list.append(f"--{name}")
|
||||
if value:
|
||||
cmd_list.append(f"--{name}")
|
||||
continue
|
||||
elif isinstance(value, str):
|
||||
# --<name>=<value>
|
||||
@ -181,6 +182,7 @@ def gen_subprocess_args(
|
||||
for item in value:
|
||||
cmd_list += parse_value(name, item)
|
||||
continue
|
||||
warn(f"invalid config {name}:{value}")
|
||||
|
||||
return cmd_list
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user