Config: Add warning on exceptions and clarify parameters
Due to how YAML works, double quotes are bad. Specify a linter in the top of the config_sample file. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
feef782dbf
commit
08a183540b
2 changed files with 15 additions and 7 deletions
7
main.py
7
main.py
|
|
@ -194,7 +194,12 @@ if __name__ == "__main__":
|
|||
try:
|
||||
with open('config.yml', 'r') as config_file:
|
||||
config = yaml.safe_load(config_file) or {}
|
||||
except:
|
||||
except Exception as e:
|
||||
print(
|
||||
"The YAML config couldn't load because of the following error:",
|
||||
f"\n\n{e}",
|
||||
"\n\nTabbyAPI will start anyway and not parse this config file."
|
||||
)
|
||||
config = {}
|
||||
|
||||
# If an initial model name is specified, create a container and load the model
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue