From 25db534a07e21f458beb76e1122f0f922fbe07d3 Mon Sep 17 00:00:00 2001 From: Carles Cufi Date: Wed, 24 Aug 2022 16:44:14 +0200 Subject: [PATCH] west: blobs: Finally fix the --format option handling Turns out that `Namespace.format` was not a good fix to the issue described in f033040812b0ce8c5c09105757eb0b3e2e9e8d17, it was returning the default format even when the user specified -f/--format. Replace "getattr" with a simple logical operation. Signed-off-by: Carles Cufi --- scripts/west_commands/blobs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/west_commands/blobs.py b/scripts/west_commands/blobs.py index 3fa7382c38b..5336b835827 100644 --- a/scripts/west_commands/blobs.py +++ b/scripts/west_commands/blobs.py @@ -114,7 +114,7 @@ class Blobs(WestCommand): def list(self, args): blobs = self.get_blobs(args) - fmt = getattr(args, 'Namespace.format', self.DEFAULT_LIST_FMT) + fmt = args.format or self.DEFAULT_LIST_FMT for blob in blobs: log.inf(fmt.format(**blob))