summary refs log tree commit diff stats
path: root/tests/docker/docker.py
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2018-07-09 14:08:25 +0100
committerAlex Bennée <alex.bennee@linaro.org>2018-07-24 11:45:25 +0100
commit43e1b2ffec8cf1741f1ccae56503803d9b8c38d1 (patch)
treedd5b2cb902eb4e885bf8822c0ee4e6bde11616e6 /tests/docker/docker.py
parentbe5e1f527abb26414a3b67882669b15649ade593 (diff)
downloadfocaccia-qemu-43e1b2ffec8cf1741f1ccae56503803d9b8c38d1.tar.gz
focaccia-qemu-43e1b2ffec8cf1741f1ccae56503803d9b8c38d1.zip
docker: fail more gracefully on docker.py check
As this is called directly from the Makefile while determining
dependencies and it is possible the user was configured in one window
but not have credentials in the other. Let's catch the Exceptions and
deal with it quietly.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'tests/docker/docker.py')
-rwxr-xr-xtests/docker/docker.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 69e7130db7..2f81c6b13b 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -479,7 +479,12 @@ class CheckCommand(SubCommand):
     def run(self, args, argv):
         tag = args.tag
 
-        dkr = Docker()
+        try:
+            dkr = Docker()
+        except:
+            print("Docker not set up")
+            return 1
+
         info = dkr.inspect_tag(tag)
         if info is None:
             print("Image does not exist")