_PrintGroupedParams: sort before printing
authorGuido Trotter <ultrotter@google.com>
Mon, 19 Apr 2010 13:05:59 +0000 (14:05 +0100)
committerGuido Trotter <ultrotter@google.com>
Tue, 20 Apr 2010 15:45:15 +0000 (16:45 +0100)
It's a lot easier, when looking at the output, if you can search the
parameter you're looking for alphabetically.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

scripts/gnt-cluster

index 0d5bbe4..1733a42 100755 (executable)
@@ -225,7 +225,7 @@ def _PrintGroupedParams(paramsdict, level=1):
 
   """
   indent = "  " * level
-  for item, val in paramsdict.items():
+  for item, val in sorted(paramsdict.items()):
     if isinstance(val, dict):
       ToStdout("%s- %s:", indent, item)
       _PrintGroupedParams(val, level=level + 1)