fix: config file not found error
This commit is contained in:
parent
480471a5ef
commit
9afd133066
1 changed files with 3 additions and 0 deletions
|
|
@ -43,6 +43,9 @@ class Settings(BaseSettings):
|
|||
if p.exists():
|
||||
with p.open("r", encoding="utf-8") as fh:
|
||||
data = yaml.safe_load(fh) or {}
|
||||
else:
|
||||
import sys
|
||||
sys.stderr.write(f"Warning: Config file {p} not found.")
|
||||
return cls(**data)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue