From patchwork Mon Jul 9 15:21:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 141432 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2798276ljj; Mon, 9 Jul 2018 08:27:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdb1JqWfsvR73BIeiFMZiRzC/2qL57i80IlUrrktbnKvUyEs8kmf7lqRwbaJJw0VW+qEM6v X-Received: by 2002:aed:3d95:: with SMTP id i21-v6mr19482770qtf.232.1531150035281; Mon, 09 Jul 2018 08:27:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531150035; cv=none; d=google.com; s=arc-20160816; b=lF+eervSp+Zm0u+fj5Z8hU5r2PQLS6hXL116XljGUfeNR8ZbTkeR7JWS9lMo8YtpSF NrhxcAEqp/L+g6L/J5IDAjIJaGoZ1zReIMSiFixB/0vK9NxGe4lJp6Z/efdNCrzaqF6x sNN4iOaKhcwkY79Ib4GmvZEzhkmZLjuObNDNmr1mamzOLHooiZ7UcGnOAtxoKNUK89F9 3ydUm8Xdm4/+8hQRFPoZiGOC8V7IcmXAchqx/6lbGso5pupoE/h5oKrE4+IM0dwJgrL1 Jop9tSl/naVmmGPiHtp5IOtaY8Rx+04Qk0g7m7GrvEewu6e8fQUeaDnJtHWpYithc+JL 9ywA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=b9dwgQE+jSaWHFqJ6A4rb3x0Ow71/8K1IvfxEN0HeeM=; b=DDNcdn3wBWIb26p6S5/PMV8tmjyecdmbjzofYYdI12BD+9IeqzXlBlQ/BlkufS6G9N 9DAcachLVzhbnKUS3xe0/EEW/dKhTzoPUAoE5X9oE8Nn0FfqP2gd3TFGpD8XS9CTWSac rwjEbPNy3sFC0r8VdbwUZ5NkKDK7pTNw4mhhVYulZQPpDvp/n6D2dPJguNpJikILGuhX ULpSbz3aQ3esJ0xK1sjPXBk7Vk/nkbWghQReGc6oexrevfRnZL0CSUriFFE/8MfxRdz/ 8vF3CQQU7fIt+r/BwW7P5n5Kh7qv2e1jpHOufYMOlDtPnDY0qUlh5M1HlYPEJCC6Ko25 21OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ctIM3vqp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id b184-v6si2420015qkd.69.2018.07.09.08.27.15 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 09 Jul 2018 08:27:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ctIM3vqp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:42769 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcY4I-0005K7-LQ for patch@linaro.org; Mon, 09 Jul 2018 11:27:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcXye-0000lZ-Jd for qemu-devel@nongnu.org; Mon, 09 Jul 2018 11:21:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcXyc-0005VE-Vj for qemu-devel@nongnu.org; Mon, 09 Jul 2018 11:21:24 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:36056) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fcXyc-0005Uw-OO for qemu-devel@nongnu.org; Mon, 09 Jul 2018 11:21:22 -0400 Received: by mail-wr1-x42f.google.com with SMTP id h9-v6so11417103wro.3 for ; Mon, 09 Jul 2018 08:21:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=b9dwgQE+jSaWHFqJ6A4rb3x0Ow71/8K1IvfxEN0HeeM=; b=ctIM3vqpc7cHgoM2DpDbnFZpRo+YyP9eeaUPiwfNQ4RGwlRFiHJgoi9EY5uDKXwMPj QJO168SxVRpBy7y74TvDqvj+HPSVau8U04AN0/0Mh2uLJ9Ku2yxYu8UDWu7/7ammjHTI MVUA2EmtdFB1TrnhJmGBuZX7j2wu3dyTPKV2Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=b9dwgQE+jSaWHFqJ6A4rb3x0Ow71/8K1IvfxEN0HeeM=; b=Jd3Vn9NtfAYKxKWM3HImT2AuYuGEn86ULo7DoIfyb89twqPpsCQ6yTzWysrfYpyNED H9meb2WaTppUQdJeZAyTYdl/AJbtubKCrbNJrmI21wuzzdsMLCDmRdEx/6EnbmHvnFzP f+nTMVPjGm0B3qNXMTl7O9CODeY9LwGrAAst9Qe51g20YtgMTMKnd7g56PPa/Qi9f+tX oZdvcLk3jmkFDuVMe0kKY5BNIbOjPU/dTmOT6pWOZLYFSQAMnDfIKDfU/HV5VtqJgUul aXJ4wyTV0e8XyPvLpxfgSUfvrDgR54KDdr/xAxaqF68oxXmVVY21yd6XawhhdXmKjMDv 3zBw== X-Gm-Message-State: APt69E0wajfCAgZatGhx6DCFIMTcYGx+0g4i0+Bmp/H/TbKzWGGBWUvO fTNML3DLoxca2x6tyg8aqzFX3g== X-Received: by 2002:adf:ad38:: with SMTP id p53-v6mr15881384wrc.10.1531149681703; Mon, 09 Jul 2018 08:21:21 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id j43-v6sm31513211wrj.1.2018.07.09.08.21.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jul 2018 08:21:20 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 1D3C73E0719; Mon, 9 Jul 2018 16:21:18 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Mon, 9 Jul 2018 16:21:10 +0100 Message-Id: <20180709152117.21585-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180709152117.21585-1-alex.bennee@linaro.org> References: <20180709152117.21585-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42f Subject: [Qemu-devel] [PATCH for 3.0 03/10] docker: fail more gracefully on docker.py check X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 Reported-by: Peter Maydell --- tests/docker/docker.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 2.17.1 Reviewed-by: Philippe Mathieu-Daudé 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")