add options --interactive/--non-interactive
authorGui Chen <gui.chen@intel.com>
Thu, 5 Dec 2013 02:47:58 +0000 (21:47 -0500)
committerGui Chen <gui.chen@intel.com>
Thu, 5 Dec 2013 03:20:14 +0000 (22:20 -0500)
this option pair can enable/disable interactive output

Fixes: #1243

Change-Id: I57f63aed8406133f9e67c7261fe01975d34195c0
Signed-off-by: Gui Chen <gui.chen@intel.com>
tools/mic

index 964e0c1..6a0afa1 100755 (executable)
--- a/tools/mic
+++ b/tools/mic
@@ -60,9 +60,20 @@ class MicCmd(cmdln.Cmdln):
         optparser.add_option('-v', '--verbose', action='store_true',
                              dest='verbose',
                              help='verbose information')
+        optparser.add_option('-i', '--interactive', action='store_true',
+                             dest='interactive', default='True',
+                             help='interactive output')
+        optparser.add_option('--non-interactive', action='store_false',
+                             dest='interactive', default='True',
+                             help='non-interactive output')
         return optparser
 
     def postoptparse(self):
+        if self.options.interactive:
+            msger.enable_interactive()
+        else:
+            msger.disable_interactive()
+
         if self.options.verbose:
             msger.set_loglevel('VERBOSE')