From patchwork Tue Jul 17 19:55:39 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: 142211 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp4077641ljj; Tue, 17 Jul 2018 13:05:40 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfNiT9cAX+eYTEL2KCRZppb4WGJERsRcvKDvBbFji5LrImmM79PQ/uPF0JqNRwiafFcCD7x X-Received: by 2002:a0c:e5ce:: with SMTP id u14-v6mr3372392qvm.6.1531857940520; Tue, 17 Jul 2018 13:05:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531857940; cv=none; d=google.com; s=arc-20160816; b=cn36seXda7Yg/gXBAOCBZawlmNBvMyvSBRNjaUND2HYq5R9lxhOq/htLtbj4wsmDfM wICzkrzH57HVZ+LPV6seG7j788rq8gNdJ0SJ5KDgbjbw+kIXpijO4MtgcGYaE2kk0OBC MzkSWIrc+OrIXSxAuGNT9hxpBXvTv6lMNWYqlpFhFnK3x2N3+nKVPGcefCFMULqrcdc9 aXR7rJYIj3XAWsaf7c80xGr+azL4GpAyqArlR9T33+Hntf6ZB9VisiJNMLyTmXDR5fD/ STYCxYFr6fiU4MkCzulbgug/Q/UCKsbBI4lAkhOQxoraxitdUqICvHKCwDTTCA+SYhbU P/5g== 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=iuLXyrPnRE4rW5eg+qwTCiglTBSrKh3Lyhji9XKfoz0=; b=QSLp7NP8EObHZy2Kqe2AmYGniihp5k5H6ZtcntA6btiTxLnwhIsQS/rW3SqaRExj6v 00LnvuiDEOEzPp5SSxAZBr+U1OHgMIM1SPhtgXNe9aHERRmB6Vak+xRssuwiApFR7EU1 kwUwyyzw+0LgFOUiCJTtEMFihtr4XivnAwAFehf8ywysmbCY0dlOc2JebnpI+ar6d14e +no8u674NNLk+IDj0Pa6+JnpweAA1qKnAW8+doXV0oKiBx0HH1KC9i4pcpgLojoqsgKs XT+1aCN+2/F+Fv7axDZoJ5yiNY/yYyPR5J8/BY1x6vhBZM+CAVLIFar3wlai3wh1rTCm b+YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YH9x2KDl; 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 33-v6si1655342qkz.366.2018.07.17.13.05.40 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 17 Jul 2018 13:05:40 -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=YH9x2KDl; 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]:32957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWE7-0001EP-Ly for patch@linaro.org; Tue, 17 Jul 2018 16:05:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffW4q-00032b-TK for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffW4m-0004bh-Cv for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:04 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:34372) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffW4m-0004b1-5w for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:00 -0400 Received: by mail-wr1-x42c.google.com with SMTP id c13-v6so2397702wrt.1 for ; Tue, 17 Jul 2018 12:55:59 -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=iuLXyrPnRE4rW5eg+qwTCiglTBSrKh3Lyhji9XKfoz0=; b=YH9x2KDlabgnoiT71hu64OEt2qfKy0sTJyFwH8SOW0d1iKlEEPYoFw8Ze28IaNQQ2Z 6qPsxv0AJOrOyUY+3zqjS6mH6hg3la/TDTKg0T/fqV9QZOWne5/sSJyeeF9NwI7x4C2G Zop2ETdSqMp1lWrFqqdYUSdqQwY15Y5kVkjdA= 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=iuLXyrPnRE4rW5eg+qwTCiglTBSrKh3Lyhji9XKfoz0=; b=grExH4xFCJ2CCNJclR1/PDXELJ0w/C1HHzfpxAzU/RQ9XtL23tlzCIDtG9P7Ck35Do d4b12gmtLbbJGEuFoBj8Wch57z4BOctNM2lQV6qBNuBQZ0CYeQSVeu+WqD46FoyMhPll OdDVgvs77QDKNObyOLdvve3CXNZyH/tQUlzYpCohwp3H7OuOx3GtDGK3+vfHGvxYsN84 szVPBw8zDn1sgbDUKtqGKss8JVJVRNmT6s41wrfKzxOtd1oy35+KJzf8Jh+yze4Akn5u ZAVVev9oZ+sq3T1KEGoicN5oXpnG7pFea1U79BUvaaM7RLsQC+CCkxEbXfDfYKIkmJCK Rqhw== X-Gm-Message-State: AOUpUlHQAus2b3r6mfPRkXCTdFsBeEfXKhpCF5HNQh7cZ4SbbG0lvaGj 8WKvidliHURyLb7pS1MgJcKnsTC7UYo= X-Received: by 2002:adf:b112:: with SMTP id l18-v6mr2456648wra.101.1531857358999; Tue, 17 Jul 2018 12:55:58 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id o4-v6sm3254189wra.3.2018.07.17.12.55.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 12:55:55 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 2C9213E04D8; Tue, 17 Jul 2018 20:55:54 +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: Tue, 17 Jul 2018 20:55:39 +0100 Message-Id: <20180717195553.9111-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180717195553.9111-1-alex.bennee@linaro.org> References: <20180717195553.9111-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::42c Subject: [Qemu-devel] [PATCH v3 for 3.0 04/18] 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 Reviewed-by: Philippe Mathieu-Daudé --- tests/docker/docker.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 2.17.1 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")