comparison sat_frontends/jp/cmd_blog.py @ 3727:a6dfd3db372b

cli (blog/get): fix default output when a value is None
author Goffi <goffi@goffi.org>
date Tue, 25 Jan 2022 17:27:39 +0100
parents 9ca19b317293
children b337d7da72e5
comparison
equal deleted inserted replaced
3726:33d75cd3c371 3727:a6dfd3db372b
364 sep="\n" if "content" in k else "", 364 sep="\n" if "content" in k else "",
365 ) 365 )
366 value = k_cb[k](item, keys) if k in k_cb else item[k] 366 value = k_cb[k](item, keys) if k in k_cb else item[k]
367 if isinstance(value, bool): 367 if isinstance(value, bool):
368 value = str(value).lower() 368 value = str(value).lower()
369 self.disp(header + value) 369 self.disp(header + (value or ""))
370 # we want a separation line after each item but the last one 370 # we want a separation line after each item but the last one
371 if idx < len(items) - 1: 371 if idx < len(items) - 1:
372 print("") 372 print("")
373 373
374 def fancy_output(self, data): 374 def fancy_output(self, data):