From f7f037384b9074990439bab642a32c44caa95c5f Mon Sep 17 00:00:00 2001
From: Bernardo Dal Seno <bdalseno@google.com>
Date: Wed, 3 Apr 2013 13:55:54 +0200
Subject: [PATCH] Remove unused code

After changing the way gnt-xxx info print their output,
cli.FormatParameterDict() is not used anymore.

Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
---
 lib/cli.py | 28 ----------------------------
 1 file changed, 28 deletions(-)

diff --git a/lib/cli.py b/lib/cli.py
index fea2c1d40..1c4873ee5 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -234,7 +234,6 @@ __all__ = [
   "ToStderr", "ToStdout",
   "FormatError",
   "FormatQueryResult",
-  "FormatParameterDict",
   "FormatParamsDictInfo",
   "FormatPolicyInfo",
   "PrintGenericInfo",
@@ -3592,33 +3591,6 @@ class JobExecutor(object):
       return [row[1:3] for row in self.jobs]
 
 
-def FormatParameterDict(buf, param_dict, actual, level=1):
-  """Formats a parameter dictionary.
-
-  @type buf: L{StringIO}
-  @param buf: the buffer into which to write
-  @type param_dict: dict
-  @param param_dict: the own parameters
-  @type actual: dict
-  @param actual: the current parameter set (including defaults)
-  @param level: Level of indent
-
-  """
-  indent = "  " * level
-
-  for key in sorted(actual):
-    data = actual[key]
-    buf.write("%s- %s:" % (indent, key))
-
-    if isinstance(data, dict) and data:
-      buf.write("\n")
-      FormatParameterDict(buf, param_dict.get(key, {}), data,
-                          level=level + 1)
-    else:
-      val = param_dict.get(key, "default (%s)" % data)
-      buf.write(" %s\n" % val)
-
-
 def FormatParamsDictInfo(param_dict, actual):
   """Formats a parameter dictionary.
 
-- 
GitLab