Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _get_env(matchobj):
var = matchobj.groups()[0]
if var not in os.environ:
raise EnvironmentNotFoundError(var)
return os.environ[var]