west: blobs: Finally fix the --format option handling

Turns out that `Namespace.format` was not a good fix to the issue
described in f033040812, 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 <carles.cufi@nordicsemi.no>
This commit is contained in:
Carles Cufi 2022-08-24 16:44:14 +02:00 committed by Carles Cufí
parent f033040812
commit 25db534a07
1 changed files with 1 additions and 1 deletions

View File

@ -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))