Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cbacd02

Browse files
authored
fixed error message for options check
1 parent 0db6358 commit cbacd02

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

env_parser/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def config(config_path: str):
1818
raise EnvNotFoundError(msg)
1919
elif envs.get(data.name):
2020
if data.options and envs.get(data.name) not in data.options:
21-
msg = f'{data.name} should be on of the following: {', '.join(data.options)}'
21+
msg = f'{data.name} is not listed inside value options.'
2222
raise InvalidEnvValue(msg)
2323
try:
2424
converted = class_type[data.value_type](envs[data.name])
@@ -33,4 +33,4 @@ def config(config_path: str):
3333

3434
if __name__ == '__main__':
3535
envs = config('./test.yml')
36-
print(envs)
36+
print(envs)

0 commit comments

Comments
 (0)