Fixed quiet, test_mode, ignore_error processing in shell_cmd

Change-Id: I7a6b83e3b4e57f0c35120a2cf17ae662c421a716
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/gen_cmd.py b/lib/gen_cmd.py
index ff30ecd..0919fe1 100644
--- a/lib/gen_cmd.py
+++ b/lib/gen_cmd.py
@@ -297,7 +297,12 @@
     command_string                  The command string to be run in a shell
                                     (e.g. "ls /tmp").
     quiet                           If set to 0, this function will print
-                                    "Issuing: <cmd string>" to stdout.
+                                    "Issuing: <cmd string>" to stdout.  When
+                                    the quiet argument is set to None, this
+                                    function will assign a default value by
+                                    searching upward in the stack for the
+                                    quiet variable value.  If no such value is
+                                    found, quiet is set to 0.
     print_output                    If this is set, this function will print
                                     the stdout/stderr generated by the shell
                                     command to stdout.
@@ -349,11 +354,8 @@
     """
 
     # Assign default values to some of the arguments to this function.
-    quiet = int(gp.get_var_value(quiet, gp.get_stack_var('quiet', 0)))
-    test_mode = int(gp.get_var_value(test_mode, gp.get_stack_var('test_mode',
-                                                                 0)))
-    ignore_err = int(gp.get_var_value(ignore_err,
-                                      gp.get_stack_var('ignore_err', 1)))
+    quiet = int(gm.dft(quiet, gp.get_stack_var('quiet', 0)))
+    ignore_err = int(gm.dft(ignore_err, gp.get_stack_var('ignore_err', 1)))
 
     err_msg = gv.svalid_value(command_string)
     if err_msg != "":