From patchwork Fri Jul 13 12:17:29 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: 141867 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp733534ljj; Fri, 13 Jul 2018 05:20:31 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe0PEWXQgS5ARWhXBaeBERdZuarzIiGLIvc0fwB/gVd3/S3MkGfsDyaJgkAQrtYETVKPvvT X-Received: by 2002:a0c:ad58:: with SMTP id v24-v6mr3228529qvc.75.1531484431759; Fri, 13 Jul 2018 05:20:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531484431; cv=none; d=google.com; s=arc-20160816; b=pbS5GlzwmSNB7DL0LwWiQr684gQDLOVhiYA6SchXYacwpypwgA9W5TnhwbUXVqeQkY mPqk4p94eq/MHF5t8h+9BRblbfztL6F5K7BFtcFGCm6RLmXkBWv9b0E4PKLrmuaXnf2N LMl+8fOSP7GZhe2oe+ow9f6gyP9n/PSZnLaUOzGHzGwvxMt3ajJUamPK2caPvoOMzofl 4PzCFu47zT9U5ZRLUNVM/LtTuBwAisJqUtHhOIhzfssy4FVNJdXBYD2q+uv4QzCCcPhZ e5s1fI2VQjrw9EW5G817kO3UZcXLOfSvCOFyA4J8qBGCxr4BD529BYT1RGh26FXrkNOp zLxQ== 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=nU/M8KRs1/tqNhFQdjlmwRpajx70PjIAkIAI+eN6fOiqiGukOH1l47F/VmBgbxY3Ej 6D9Zwb+vD2Oqd5cQ7Psq1PYxFzy4DsqGXUYro36L/XUMIoVG4U0OgKEwtdLR4tC24zcg 5bk55UVxDXqnpwh9dnxNCMd/SfaEPBIA5HcIHEkimQEszjjqVY/u6qh6ahGRiPcajPtd AR8TMVr8Oibydm75TXQuoSS+Hru92uaVtjAIscze9Z5wQyRkyCY/c+JYdP5bLVehgtnz /j4QWbQv7iAUl1YH+gHU8+5K2jN37hV6uhzp8z9fHItXkDFlOa+CWX+RmMFok88JlD7u Yu5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Ap1mJgE2; 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 i58-v6si20919391qti.134.2018.07.13.05.20.31 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 13 Jul 2018 05:20:31 -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=Ap1mJgE2; 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]:36966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdx3n-0005i3-3n for patch@linaro.org; Fri, 13 Jul 2018 08:20:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdx1A-0004lp-Bi for qemu-devel@nongnu.org; Fri, 13 Jul 2018 08:17:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fdx19-0003eT-C0 for qemu-devel@nongnu.org; Fri, 13 Jul 2018 08:17:48 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:37426) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fdx19-0003co-4L for qemu-devel@nongnu.org; Fri, 13 Jul 2018 08:17:47 -0400 Received: by mail-wr1-x42e.google.com with SMTP id q10-v6so24910895wrd.4 for ; Fri, 13 Jul 2018 05:17:47 -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=Ap1mJgE2DGjZA2w33s5SjQHtf5Xpl/W38N3xJJPVDxwSPSytV4B1hHNN90qKilQVwA CmOmP4v3OtHv0Vx08hH/2Xou5ctNFcvK1vustXIMW8odoR4OHtqfE87M0GCSiOeS/zP/ DOEf2Swz0lZCtMrwOh2H2J4DjvJhe4S1ruPQQ= 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=j6TpCTS4uQwcOg4cSSqEpgpYHl0vFQXAhEBtrIYtqeavBh7MLJFPZdn0v9f6UI/f9K 3rzrpeoY8CunRaQa6dlSo95TtMiThz2Rw2HVSjg0KDW7HPRZfCT/mzksfwvaDQAl3geW ioRFbESI0cyH9UvqeIgi9cVO6eQFsj8lTJSYGjYZP/MrhIkhnBA8SGhFPuAC1vnRah8K S4E3P5miEWL16SiQ2YRJ8rVSsWvEN/L9WZiLEi4mi6maOef51Cc+TyX/uK5lHg52RHGx XmTAzULkqEt7Xsb99vnGshyBJOFMeCVyKNvteRhwMrtHMz9ft05Lt2e3iiDWYXHI2+Fi tdjA== X-Gm-Message-State: AOUpUlFLw/Ta4b5VYyJGygQKvp8EzxUrKKxYlz3tKmHtRJZE8IWjoblJ 5NlmRGcEmBVnULDfYFL9+lMTZA== X-Received: by 2002:adf:c00b:: with SMTP id z11-v6mr4541757wre.268.1531484266161; Fri, 13 Jul 2018 05:17:46 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id y14-v6sm4982246wrq.45.2018.07.13.05.17.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Jul 2018 05:17:43 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 3D41B3E06C8; Fri, 13 Jul 2018 13:17:42 +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: Fri, 13 Jul 2018 13:17:29 +0100 Message-Id: <20180713121741.19262-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180713121741.19262-1-alex.bennee@linaro.org> References: <20180713121741.19262-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::42e Subject: [Qemu-devel] [PATCH v2 for 3.0 04/16] 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")