Unverified Commit b19e0bb9 authored by David Haynes's avatar David Haynes 🙆
Browse files

refactor: Exceptions must use `as`



- And now the single "except" does
Signed-off-by: David Haynes's avatarDavid Haynes <dhaynes3@gmu.edu>
parent 0fd61159
Pipeline #1205 passed with stage
in 19 seconds
......@@ -15,7 +15,7 @@ def get_env_setting(setting):
""" Get the environment setting or return exception """
try:
return environ[setting]
except KeyError:
except KeyError as ex:
error_msg = "Set the %s env variable" % setting
raise ImproperlyConfigured(error_msg)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment