From e9e13e9ed99504a08414fcaaf3d06580480a27b8 Mon Sep 17 00:00:00 2001 From: Thomas Roos Date: Tue, 9 Jan 2024 10:06:39 +0000 Subject: [PATCH] auto-upgrader: change regex to match upgrade check output string for check-upgrade-status was changed on devtool and not print on stderr, stdout instead --- auto-upgrader/upgrader/updates.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/auto-upgrader/upgrader/updates.py b/auto-upgrader/upgrader/updates.py index a84a08b..cce7449 100644 --- a/auto-upgrader/upgrader/updates.py +++ b/auto-upgrader/upgrader/updates.py @@ -70,9 +70,9 @@ def check_for_updates(recipe: str) -> bool: def _check_for_updates(recipe: str) -> Optional[dict]: - (_, stderr, _) = run(f"devtool check-upgrade-status {recipe}") - update_re = r"INFO:\s+" + recipe + r"\s+([^\s]+)\s+([^\s]+)" - m = re.search(update_re, stderr) + (_, stdout, _) = run(f"devtool check-upgrade-status {recipe}") + update_re = recipe + r"\s+([^\s]+)\s+([^\s]+)" + m = re.search(update_re, stdout) if m: logger.info(f"Update for {recipe}:\t{m.group(1)}\t->\t{m.group(2)}") return {"recipe": recipe, "previous_version": m.group(1), "next_version": m.group(2)}