]> git.proxmox.com Git - mirror_qemu.git/commitdiff
docker: fail more gracefully on docker.py check
authorAlex Bennée <alex.bennee@linaro.org>
Mon, 9 Jul 2018 13:08:25 +0000 (14:08 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Tue, 24 Jul 2018 10:45:25 +0000 (11:45 +0100)
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>
tests/docker/docker.py

index 69e7130db7c7714327b335121b3ee0479d6a51f8..2f81c6b13b9682851892471e24d9a431a6b36f42 100755 (executable)
@@ -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")