From 74b70d944f6bb26f46f4961077ca94a496eae9d3 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Fri, 26 Oct 2018 16:01:15 +0200 Subject: [PATCH] utils: be Python 2 compatible when squashing is enabled INFO:kolla.common.utils.base:Parent lastest layer is: sha256:75835a67d1341bdc7f4cc4ed9fa1631a7d7b6998e9327272afea342d90c4ab6d ERROR:kolla.common.utils.base:Unknown error when building Traceback (most recent call last): File "/home/hrw/devel/linaro/17.12/kolla/kolla/image/build.py", line 598, in builder self.squash() File "/home/hrw/devel/linaro/17.12/kolla/kolla/image/build.py", line 619, in squash tmp_dir=self.conf.squash_tmp_dir) File "/home/hrw/devel/linaro/17.12/kolla/kolla/common/utils.py", line 72, in squash ex.stdout) AttributeError: 'CalledProcessError' object has no attribute 'stdout' stdout was added in Python 3 as alias for output Change-Id: I7a6cef2ef6201d6b34c640bd6d1c7762c8bf5611 --- kolla/common/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kolla/common/utils.py b/kolla/common/utils.py index bb499dfe50..8913b132e7 100644 --- a/kolla/common/utils.py +++ b/kolla/common/utils.py @@ -69,5 +69,5 @@ def squash(old_image, new_image, subprocess.check_output(cmds, stderr=subprocess.STDOUT) # nosec except subprocess.CalledProcessError as ex: LOG.exception('Get error during squashing image: %s', - ex.stdout) + ex.output) raise