comparison sat_frontends/jp/cmd_file.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 c3cb18236bdf
children 9d0df638c8b4
comparison
equal deleted inserted replaced
3120:0c29155ac68b 3121:040ca99e25fe
640 keys = headers = ("name", "type", "size") 640 keys = headers = ("name", "type", "size")
641 elif self.verbosity > 1: 641 elif self.verbosity > 1:
642 show_header = True 642 show_header = True
643 keys = ("name", "type", "size", "file_hash") 643 keys = ("name", "type", "size", "file_hash")
644 headers = ("name", "type", "size", "hash") 644 headers = ("name", "type", "size", "hash")
645 table = common.Table.fromDict( 645 table = common.Table.fromListDict(
646 self.host, 646 self.host,
647 files_data, 647 files_data,
648 keys=keys, 648 keys=keys,
649 headers=headers, 649 headers=headers,
650 filters={"name": self._name_filter, "size": self._size_filter}, 650 filters={"name": self._name_filter, "size": self._size_filter},