From 17c5ea107aa0f98c55cfbd4712616981d5931832 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Sat, 20 Jul 2024 00:33:44 +0200 Subject: [PATCH] fix(log): add the stdio log if it doesn't exist Signed-off-by: Raito Bezarius --- buildbot_nix/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/buildbot_nix/__init__.py b/buildbot_nix/__init__.py index 97e0016..cc6906b 100644 --- a/buildbot_nix/__init__.py +++ b/buildbot_nix/__init__.py @@ -457,9 +457,13 @@ class NixConfigure(buildstep.CommandMixin, steps.BuildStep): self.observer = logobserver.BufferLogObserver() self.addLogObserver("stdio", self.observer) + @defer.inlineCallbacks def run(self) -> Generator[Any, object, Any]: - configure_log: Log = yield self.getLog("stdio") + try: + configure_log: Log = yield self.getLog("stdio") + except Exception: + configure_log: Log = yield self.addLog("stdio") # Takes precedence. configure_log.addStdout("checking if there's a .ci/buildbot.nix...")