diff --git a/buildrunner/__init__.py b/buildrunner/__init__.py index 85dfa01..37909e2 100644 --- a/buildrunner/__init__.py +++ b/buildrunner/__init__.py @@ -472,6 +472,7 @@ def run(self): # pylint: disable=too-many-statements,too-many-branches,too-many ) else: self.log.write("\nPush not requested\n") + except requests.exceptions.ConnectionError as rce: print(str(rce)) exit_explanation = ( @@ -481,6 +482,9 @@ def run(self): # pylint: disable=too-many-statements,too-many-branches,too-many "remote PyPi server information is set correctly." ) self.exit_code = 1 + except ImageNotFound as inf: + exit_explanation = f"Image not found: {inf.explanation}" + self.exit_code = os.EX_CONFIG except BuildRunnerError as exc: exit_explanation = str(exc) self.exit_code = ( diff --git a/tests/test-files/test-docker-pull-failure.yaml b/tests/test-files/test-docker-pull-failure.yaml index 2dd1b63..d76b76a 100644 --- a/tests/test-files/test-docker-pull-failure.yaml +++ b/tests/test-files/test-docker-pull-failure.yaml @@ -2,5 +2,5 @@ steps: use-bogus-image: run: - image: user1/buildrunner-test-multi-platform:bogus + image: user1/buildrunner-bogus-image:bogus cmd: echo "Hello World"