INNER CODE UNIT · Python
abort
terraform-aws-modules/terraform-aws-lambda · package.py:104
def abort(message):
"""Exits with an error message."""
log.error(message)
sys.exit(1)
@contextmanager
def cd(path, silent=False):
"""Changes the working directory."""
cwd = os.getcwd()
if not silent:
cmd_log.info("cd %s", shlex.quote(path))
try:
os.chdir(path)
yield
finally:
os.chdir(cwd)