From 8d23e1fae742ed2a0971dfd92274608f9f186966 Mon Sep 17 00:00:00 2001 From: Michael Royzen Date: Sat, 12 Dec 2020 06:15:27 +0000 Subject: [PATCH] Added black formatting --- src/popper/runner_host.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/popper/runner_host.py b/src/popper/runner_host.py index 2301ed281..8c1c65540 100644 --- a/src/popper/runner_host.py +++ b/src/popper/runner_host.py @@ -180,7 +180,10 @@ def _create_container(self, cid, step): log.info(f"[{step.id}] docker build {img}:{tag} {build_ctx_path}") if not self._config.dry_run: streamer = self._d.api.build( - decode=True, path=build_ctx_path, tag=f"{img}:{tag}", rm=True, + decode=True, + path=build_ctx_path, + tag=f"{img}:{tag}", + rm=True, ) for chunk in streamer: if self._config.quiet: @@ -194,21 +197,22 @@ def _create_container(self, cid, step): log.info(f"[{step.id}] docker pull {img}:{tag}") if not self._config.dry_run: streamer = self._d.api.pull( - repository=f"{img}:{tag}", decode=True, + repository=f"{img}:{tag}", + decode=True, ) - + for chunk in streamer.splitlines(): if self._config.quiet: continue chunk = chunk.strip() if chunk: import json + chunk = json.loads(chunk) - if 'id' in chunk: - log.step_info(chunk['id'] + ': ' + chunk['status']) + if "id" in chunk: + log.step_info(chunk["id"] + ": " + chunk["status"]) else: - log.step_info(chunk['status']) - + log.step_info(chunk["status"]) if self._config.dry_run: return