X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c405f9adab08daa3d4edef9cddd5453a79446c7b..d71e2f174f9a58b315037750ac301225ec68e11f:/sdk/cwl/arvados_cwl/util.py diff --git a/sdk/cwl/arvados_cwl/util.py b/sdk/cwl/arvados_cwl/util.py index 98a2a89a1d..776fc6bc25 100644 --- a/sdk/cwl/arvados_cwl/util.py +++ b/sdk/cwl/arvados_cwl/util.py @@ -26,6 +26,9 @@ def get_current_container(api, num_retries=0, logger=None): current_container = api.containers().current().execute(num_retries=num_retries) except ApiError as e: # Status code 404 just means we're not running in a container. - if e.resp.status != 404 and logger: - logger.info("Getting current container: %s", e) + if e.resp.status != 404: + if logger: + logger.info("Getting current container: %s", e) + raise e + return current_container