[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/6] docker: Use os.environ.items() instead of .iter
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PATCH 4/6] docker: Use os.environ.items() instead of .iteritems() |
Date: |
Tue, 26 Jun 2018 23:14:21 -0300 |
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 <address@hidden>
---
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
- [Qemu-devel] [PATCH 0/6] docker: Port to Python 3, Eduardo Habkost, 2018/06/26
- [Qemu-devel] [PATCH 1/6] docker: Use BytesIO instead of StringIO, Eduardo Habkost, 2018/06/26
- [Qemu-devel] [PATCH 2/6] docker: Always return int on run(), Eduardo Habkost, 2018/06/26
- [Qemu-devel] [PATCH 3/6] docker: Add type annotations, Eduardo Habkost, 2018/06/26
- [Qemu-devel] [PATCH 4/6] docker: Use os.environ.items() instead of .iteritems(),
Eduardo Habkost <=
- [Qemu-devel] [PATCH 5/6] docker: Make _get_so_libs() work on Python 3, Eduardo Habkost, 2018/06/26
- [Qemu-devel] [PATCH 6/6] docker: Open dockerfiles in text mode, Eduardo Habkost, 2018/06/26