From patchwork Wed Jul 12 07:55:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 787046 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x6rqf5nYCz9ryv for ; Wed, 12 Jul 2017 17:56:14 +1000 (AEST) Received: from localhost ([::1]:50894 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVCVI-0000HQ-1B for incoming@patchwork.ozlabs.org; Wed, 12 Jul 2017 03:56:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVCUm-0000GY-NM for qemu-devel@nongnu.org; Wed, 12 Jul 2017 03:55:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVCUl-00008p-Tb for qemu-devel@nongnu.org; Wed, 12 Jul 2017 03:55:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44280) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dVCUl-00007X-G4 for qemu-devel@nongnu.org; Wed, 12 Jul 2017 03:55:39 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4C18B81227; Wed, 12 Jul 2017 07:55:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4C18B81227 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=famz@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4C18B81227 Received: from lemon.redhat.com (ovpn-12-22.pek2.redhat.com [10.72.12.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id B6F8E1717E; Wed, 12 Jul 2017 07:55:35 +0000 (UTC) From: Fam Zheng To: qemu-devel@nongnu.org Date: Wed, 12 Jul 2017 15:55:27 +0800 Message-Id: <20170712075528.22770-2-famz@redhat.com> In-Reply-To: <20170712075528.22770-1-famz@redhat.com> References: <20170712075528.22770-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 12 Jul 2017 07:55:38 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/2] docker.py: Drop infile parameter 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=20Benn=C3=A9e?= , Fam Zheng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The **kwargs can do this just well. Signed-off-by: Fam Zheng Reviewed-by: Philippe Mathieu-Daudé --- tests/docker/docker.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index e707e5b..f5ac86b 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -112,11 +112,9 @@ class Docker(object): signal.signal(signal.SIGTERM, self._kill_instances) signal.signal(signal.SIGHUP, self._kill_instances) - def _do(self, cmd, quiet=True, infile=None, **kwargs): + def _do(self, cmd, quiet=True, **kwargs): if quiet: kwargs["stdout"] = DEVNULL - if infile: - kwargs["stdin"] = infile return subprocess.call(self._command + cmd, **kwargs) def _do_kill_instances(self, only_known, only_active=True): @@ -184,7 +182,7 @@ class Docker(object): def update_image(self, tag, tarball, quiet=True): "Update a tagged image using " - self._do(["build", "-t", tag, "-"], quiet=quiet, infile=tarball) + self._do(["build", "-t", tag, "-"], quiet=quiet, stdin=tarball) def image_matches_dockerfile(self, tag, dockerfile): try: