Skip to content

Commit

Permalink
chore: 优化配置文件读取
Browse files Browse the repository at this point in the history
  • Loading branch information
lerdb authored and Folltoshe committed Dec 2, 2023
1 parent 2396308 commit 2957528
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def _read_config(key):
except:
return None

debug_mode = _read_config("common.debug_mode") if _read_config("common.debug_mode") else False
log_length_limit = _read_config("common.log_length_limit") if _read_config("common.log_length_limit") else 500
debug_mode = debug_mode if (debug_mode := _read_config("common.debug_mode")) else False
log_length_limit = log_length_limit if (log_length_limit := _read_config("common.log_length_limit")) else 500
running = True
config = {}
workdir = os.getcwd()
Expand Down

0 comments on commit 2957528

Please # to comment.