Skip to content

Commit c6b1696

Browse files
committed
fix: 修复识别不出输入方案时的代码错误
1 parent e948363 commit c6b1696

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

main.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,20 +104,20 @@ def main():
104104
scheme_result = input("识别为 {} 词库, 输入 0 -- 正确, 1 -- 错误 以继续: ".format(scheme_type))
105105
if scheme_type == "" or scheme_result == 1:
106106
input_scheme_type = input("输入 Rime userdb.txt 方案类型 (0 -- pinyin, 1 -- wubi): ")
107-
if input_scheme_type == 0:
108-
scheme_type == "luna_pinyin"
109-
elif input_scheme_type == 1:
107+
if input_scheme_type == '0':
108+
scheme_type = "luna_pinyin"
109+
elif input_scheme_type == '1':
110110
scheme_type = "wubi86"
111111

112112
while True:
113113
input_format = ["0", "1"]
114114
userdb_type = input("输入 Rime userdb.txt 简繁类型 (0 -- 简体, 1 -- 繁体): ")
115115
if userdb_type not in input_format:
116-
userdb_type = print("格式不对, 重新输入")
116+
userdb_type = print("参数格式错误, 重新输入")
117117
continue
118118
gboard_type = input("输入 GboardDictionary.zip 简繁类型 (0 -- 简体, 1 -- 繁体): ")
119119
if gboard_type not in input_format:
120-
gboard_type = print("格式不对, 重新输入")
120+
gboard_type = print("参数格式错误, 重新输入")
121121
continue
122122
else:
123123
break

0 commit comments

Comments
 (0)