From patchwork Tue Jul 24 10:50:56 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: 142758 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp7119997ljj; Tue, 24 Jul 2018 03:59:13 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdjKaS7Y6T/8bRmeTOfdu/GY5Kzq3Zf4vzF393vjWTpHbuiip5pb2C1DUEKrpZOW2NOEQoV X-Received: by 2002:a37:a4d1:: with SMTP id n200-v6mr14951643qke.348.1532429953227; Tue, 24 Jul 2018 03:59:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532429953; cv=none; d=google.com; s=arc-20160816; b=NiCM5+xObJ1zsjA6rbgqN4Famj2jNTh3Y9VqhJVurtw0lvfPYN2IluDJcVkGddqIhY TJflYrrNe+znxxkx3su6Z+qJBVbwD9e9rZ5miVJNDANlkckVqVpk3KsJKWRiGf4ff9Vo mgPx9wSl1sG5fG7yjPZU6JT6Dky67p7TnXYby5LxUJ4gcSb1TAKTb23DSr5+EmHW7ckw BkUVTRRCw1jHAmUzNqQbBbHOEBv4MktHxlUY1DuAVVkO2wJpjvM7i1ZrXJP24/Kw7iIu rkgb+D2wVPCQ9jVxjTHZV2NUrC+F+6MtcUtHwy9wBsLAtmu6C+EtH8NUym2a+TaPMSkk Te0g== 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=nEc74mCO7Slzbvsmn7eL5AKEB4COr192uF8yOdw9aaM=; b=hwMDQpSfCiOpzNlge4f1rXpWHWHaQ3FrlIBiaGlg38pF0teFXYfUmIwCycMsCoW6mm wUPh/aBPCOSH0Pd1ApW4aJewig014FvnYhrPNl4Gb7ajO+hrQbHkS92o616S//GyLQ8j QMQyQ9C+JcJpLCypvB6buUYvkPJ+hE51MSKwOxo0hewsusZqmCpJBeLuMm4p0pvMdDvr VaWiJg+MndGIIe5zu0ArsbqPkwKZ/XLAcLeALOzw2QaSYQjP7jAg/gnmoOD5dANecgvH Nyr/i+WfIh4fj6c3efh3WbcdQ4nDVy8gnUS+n+qNQXLOT8Q11scVn8W4TP22xuA8ApgX WubA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=FAXjxCWY; 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 u3-v6si11340750qku.184.2018.07.24.03.59.13 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 24 Jul 2018 03:59:13 -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=FAXjxCWY; 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]:39473 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhv28-0006oD-Le for patch@linaro.org; Tue, 24 Jul 2018 06:59:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhuuU-0000rp-2J for qemu-devel@nongnu.org; Tue, 24 Jul 2018 06:51:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhuuS-0006QO-4j for qemu-devel@nongnu.org; Tue, 24 Jul 2018 06:51:18 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:40751) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhuuR-0006Py-UU for qemu-devel@nongnu.org; Tue, 24 Jul 2018 06:51:16 -0400 Received: by mail-wr1-x431.google.com with SMTP id t6-v6so3653842wrn.7 for ; Tue, 24 Jul 2018 03:51:15 -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=nEc74mCO7Slzbvsmn7eL5AKEB4COr192uF8yOdw9aaM=; b=FAXjxCWYWoIRwrQjYmO50b3CG1X2JX5enNyUCRCFJuWIzUeBGr2bdd5g8zBmnenpIw rMLXapAl3gYTWEdM/q7FQYIr04M7YZ3rzFOMll0l3a6RaIEi+BztpCV+CwSgEzc3hxnB if+HF9M12U+emfrsAvhimyir1fjK3/P3OeyEc= 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=nEc74mCO7Slzbvsmn7eL5AKEB4COr192uF8yOdw9aaM=; b=exhocd2EGPWe3VYJlUUww6qP77sDS5QWid6mxer+hEjYoj9cAjcQnCh0PnsEmasiyT kXZi+eFTC9nWsWTGCS6QbEdOBg0zZi4pnFZz5ugVQXP5vaZomUx+iN0crIGBOrUkBkgH lPclcbTqudPHdr45oQ5Ybut0lYsWySSrgWe+wwom7ey9QDyELpf04WU3ISIy/q9UJI4e 9UE5yqVl9w3bbpbqDTqqrwR5GCPmTFuy4t+/rotKP2nlPbhhjSs31bH4dY9YwtWtwsYv /yMxqFGWGFSc0tE7MnWip3NKUkcSa9KecNTKFmuGDLRGz3RoBLapAOPSKUKXYLYcQBoY +fYA== X-Gm-Message-State: AOUpUlF/c8li8ydEbFBy7ryjV0BcRZ5qnD7YVCQS+875gzzQk3+3W9sU TOHeMOOD0JW9gu4q/0cSFKt4oQ== X-Received: by 2002:a5d:6892:: with SMTP id h18-v6mr11132016wru.108.1532429474804; Tue, 24 Jul 2018 03:51:14 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id e12-v6sm9652484wrt.29.2018.07.24.03.51.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Jul 2018 03:51:11 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 32A843E056A; Tue, 24 Jul 2018 11:51:10 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Tue, 24 Jul 2018 11:50:56 +0100 Message-Id: <20180724105109.8392-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180724105109.8392-1-alex.bennee@linaro.org> References: <20180724105109.8392-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::431 Subject: [Qemu-devel] [PULL 04/17] 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: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= 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é -- 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")