Sfoglia il codice sorgente

ioutils: array for table values of ioutils_dict_print()

Daniel-Constantin Mierla 11 mesi fa
parent
commit
533aee8b3e
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      kamcli/ioutils.py

+ 1 - 1
kamcli/ioutils.py

@@ -109,7 +109,7 @@ def ioutils_dict_print(ctx, oformat, ostyle, res):
         # pprint.pprint(dict(row), indent=4)
         # pprint.pprint(dict(row), indent=4)
         print()
         print()
     elif oformat == "table":
     elif oformat == "table":
-        gstring = tabulate(res, headers="keys", tablefmt=ostyle)
+        gstring = tabulate([res.values()], headers=res.keys(), tablefmt=ostyle)
         print(gstring)
         print(gstring)
     else:
     else:
         print(res)
         print(res)