From dfb9595f7dd34c164f45e7212455136e1f2271d6 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 c0e5324..06de985 100644 --- a/buildbot_nix/__init__.py +++ b/buildbot_nix/__init__.py @@ -496,9 +496,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...")