Remove an unused function
authorIustin Pop <iustin@google.com>
Mon, 11 May 2009 13:30:14 +0000 (15:30 +0200)
committerIustin Pop <iustin@google.com>
Mon, 11 May 2009 14:18:14 +0000 (16:18 +0200)
The _TransformPath function is not used anymore in 2.0, let's remove it.

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

scripts/gnt-instance

index 62a1f03..ecb93bb 100755 (executable)
@@ -154,29 +154,6 @@ def _ConfirmOperation(inames, text):
   return choice
 
 
-def _TransformPath(user_input):
-  """Transform a user path into a canonical value.
-
-  This function transforms the a path passed as textual information
-  into the constants that the LU code expects.
-
-  """
-  if user_input:
-    if user_input.lower() == "default":
-      result_path = constants.VALUE_DEFAULT
-    elif user_input.lower() == "none":
-      result_path = constants.VALUE_NONE
-    else:
-      if not os.path.isabs(user_input):
-        raise errors.OpPrereqError("Path '%s' is not an absolute filename" %
-                                   user_input)
-      result_path = user_input
-  else:
-    result_path = constants.VALUE_DEFAULT
-
-  return result_path
-
-
 def _EnsureInstancesExist(client, names):
   """Check for and ensure the given instance names exist.