Closed azaz-az closed 4 months ago
🐛 使用 fcls 命令时,若输入意料之外的输入,将会直接报错
例如:
Holiday Predictor / 假期预测器 - 基于 Python 的调休预测工具 键入 help 以查看帮助。 > fcls abc def sdge Traceback (most recent call last): File "C:\Users\a233d\Documents\git\holiday-predictor\__main__.py", line 49, in <module> print(calculation_forecast_list(input_list)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\a233d\Documents\git\holiday-predictor\main.py", line 104, in calculation_forecast_list start_year: int = int(given_list[1]) ^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: 'abc' 进程已结束,退出代码为 1
应当加入 try 以解决这个问题
try
已在 v0.13.0-alpha.1 版本中修复此 bug.
🐛 使用 fcls 命令时,若输入意料之外的输入,将会直接报错
例如:
应当加入
try
以解决这个问题