14886: Fixes mock issue between tests
[arvados.git] / sdk / cwl / arvados_cwl / util.py
index 98a2a89a1d281e056ee3067752e6094349123115..776fc6bc25dae06e232e2546cab501246d6cd6b3 100644 (file)
@@ -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