qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Daniel P. Berrange" <berrange@redhat.com>,
	"Cleber Rosa" <crosa@redhat.com>, "Fam Zheng" <famz@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: [Qemu-devel] [PATCH 4/6] docker: Use os.environ.items() instead of .iteritems()
Date: Tue, 26 Jun 2018 23:14:21 -0300	[thread overview]
Message-ID: <20180627021423.18404-5-ehabkost@redhat.com> (raw)
In-Reply-To: <20180627021423.18404-1-ehabkost@redhat.com>

Mapping.iteritems() doesn't exist in Python 3.

Note that Mapping.items() exists in both Python 3 and Python 2,
but it returns a list (and not an iterator) in Python 2.  The
existing code will work on both cases, though.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 tests/docker/docker.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index db6b463b92..bc34bd872b 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -355,7 +355,7 @@ class BuildCommand(SubCommand):
                 cksum += [(filename, _file_checksum(filename))]
 
             argv += ["--build-arg=" + k.lower() + "=" + v
-                        for k, v in os.environ.iteritems()
+                        for k, v in os.environ.items()
                         if k.lower() in FILTERED_ENV_NAMES]
             dkr.build_image(tag, docker_dir, dockerfile,
                             quiet=args.quiet, user=args.user, argv=argv,
-- 
2.18.0.rc1.1.g3f1ff2140

  parent reply	other threads:[~2018-06-27  2:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-27  2:14 [Qemu-devel] [PATCH 0/6] docker: Port to Python 3 Eduardo Habkost
2018-06-27  2:14 ` [Qemu-devel] [PATCH 1/6] docker: Use BytesIO instead of StringIO Eduardo Habkost
2018-06-27  2:14 ` [Qemu-devel] [PATCH 2/6] docker: Always return int on run() Eduardo Habkost
2018-06-27  2:14 ` [Qemu-devel] [PATCH 3/6] docker: Add type annotations Eduardo Habkost
2018-06-27  2:14 ` Eduardo Habkost [this message]
2018-06-27  2:22   ` [Qemu-devel] [PATCH 4/6] docker: Use os.environ.items() instead of .iteritems() Philippe Mathieu-Daudé
2018-06-27  2:14 ` [Qemu-devel] [PATCH 5/6] docker: Make _get_so_libs() work on Python 3 Eduardo Habkost
2018-06-27  2:14 ` [Qemu-devel] [PATCH 6/6] docker: Open dockerfiles in text mode Eduardo Habkost
2018-06-27 12:51   ` Eric Blake
2018-06-27 13:34     ` Eduardo Habkost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180627021423.18404-5-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=crosa@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=famz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).