Commit cc5b94db authored by Guido Trotter's avatar Guido Trotter
Browse files

gnt-node: remove latinfriendlyfields



Rather than relying on a static list of fields, we opportunistically
convert all integers.
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 6396164f
......@@ -208,10 +208,6 @@ def ListNodes(opts, args):
"pinst_cnt", "sinst_cnt",
"ctotal", "serial_no"]
latinfriendlyfields = ["pinst_cnt", "sinst_cnt",
"ctotal", "cnodes", "csockets",
"serial_no"]
list_type_fields = ("pinst_list", "sinst_list", "tags")
# change raw values to nicer strings
for row in output:
......@@ -228,7 +224,7 @@ def ListNodes(opts, args):
val = utils.FormatTime(val)
elif val is None:
val = "?"
elif opts.roman_integers and field in latinfriendlyfields:
elif opts.roman_integers and isinstance(val, int):
val = compat.TryToRoman(val)
row[idx] = str(val)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment