From e81a266b40d0bfe9d2d79939b6c9763396b07671 Mon Sep 17 00:00:00 2001 From: tomaszdrozdz <14263613+tomaszdrozdz@users.noreply.github.com> Date: Thu, 13 Aug 2020 18:01:57 +0200 Subject: [PATCH] Work ongoing. Co-authored-by: tigerthelion --- sanic/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sanic/utils.py b/sanic/utils.py index a7e4627b..7493f4d8 100644 --- a/sanic/utils.py +++ b/sanic/utils.py @@ -55,7 +55,7 @@ def load_module_from_file_location(name: str, location: Union[bytes, str], enc: # B) Check these variables exists in environment. not_defined_env_vars = env_vars_in_location.difference(os_environ.keys()) if not_defined_env_vars: - raise Exception("There are no following environment variables: " + ", ".join(not_defined_env_vars)) # TO ASK: Can we raise better exception type here ??? + raise Exception("The following environment variables are not set: " + ", ".join(not_defined_env_vars)) # TO ASK: Can we raise better exception type here ??? # C) Substitute them in location. for env_var in env_vars_in_location: