comparison sat_frontends/jp/cmd_event.py @ 3121:040ca99e25fe

jp (common): various Table fixes: - renamed fromDict to more accurate fromListDict - fixed handling of None filter in fromListDict - fixes show_header when no header exist - escape headers when using namedtuple, so it won't fail
author Goffi <goffi@goffi.org>
date Sat, 25 Jan 2020 21:08:37 +0100
parents fee60f17ebac
children 9d0df638c8b4
comparison
equal deleted inserted replaced
3120:0c29155ac68b 3121:040ca99e25fe
314 jid_data["guests"] = "" 314 jid_data["guests"] = ""
315 data.append(jid_data) 315 data.append(jid_data)
316 316
317 show_table = OUTPUT_OPT_TABLE in self.args.output_opts 317 show_table = OUTPUT_OPT_TABLE in self.args.output_opts
318 318
319 table = common.Table.fromDict( 319 table = common.Table.fromListDict(
320 self.host, 320 self.host,
321 data, 321 data,
322 ("nick",) 322 ("nick",)
323 + (("jid",) if self.host.verbosity else ()) 323 + (("jid",) if self.host.verbosity else ())
324 + ("attend", "guests"), 324 + ("attend", "guests"),