From 4c1392abffc55a50866353a3a87d4cc4711c083d Mon Sep 17 00:00:00 2001 From: James Turk Date: Thu, 18 May 2023 17:55:19 -0500 Subject: [PATCH] single-exception in error_map --- src/beakers/recipe.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/beakers/recipe.py b/src/beakers/recipe.py index 5666859..eec36b8 100644 --- a/src/beakers/recipe.py +++ b/src/beakers/recipe.py @@ -181,10 +181,13 @@ class Recipe: name = edge["transform"].name print(f" {from_b} -({name})-> {to_b}") for k, v in edge["transform"].error_map.items(): - typer.secho( - f" {' '.join(c.__name__ for c in k)} -> {v}", - fg=typer.colors.RED, - ) + if isinstance(k, tuple): + typer.secho( + f" {' '.join(c.__name__ for c in k)} -> {v}", + fg=typer.colors.RED, + ) + else: + typer.secho(f" {k.__name__} -> {v}", fg=typer.colors.RED) def run_once( self, start_beaker: str | None = None, end_beaker: str | None = None