add verbose argument in kvm-admin
authorJens Kasten <jens@kasten-edv.de>
Tue, 10 Apr 2012 08:23:12 +0200
changeset 120 0316dca56534
parent 119 14a535ecb02d
child 121 886baf99fea5
add verbose argument in kvm-admin
bin/kvm-admin
--- a/bin/kvm-admin	Tue Apr 10 08:22:43 2012 +0200
+++ b/bin/kvm-admin	Tue Apr 10 08:23:12 2012 +0200
@@ -95,7 +95,9 @@
     # manage the commandline arguments
     parser = argparse.ArgumentParser()
     parser.add_argument("--debug", default=False, action="store_true",
-        help="Print full python traceback.")
+        help=_("Print full python traceback if an error occur."))
+    parser.add_argument("--verbose", default=False, action="store_true",
+        help=_("Show additional information."))
     
     # add action as subparser
     subparser = parser.add_subparsers(title="All commands for kvm-admin",
@@ -129,6 +131,7 @@
     args = parser.parse_args()
     
     kvm_admin.debug = args.debug
+    kvm_admin.verbose = args.verbose
 
     # assign the action and domain name dynamically
     for action in actions:
@@ -148,8 +151,8 @@
     if kvm_admin.action == "shutdown":
         # make a check otherwise its override the default value 
         # from header.py with None
-        if args.wait_to_send_enter
-        kvm_admin.shutdown_wait_to_send_enter = args.wait_to_send_enter
+        if args.wait_to_send_enter:
+            kvm_admin.shutdown_wait_to_send_enter = args.wait_to_send_enter
         if args.time_out:
             kvm_admin.shutdown_time_out = args.time_out
        
@@ -182,5 +185,5 @@
     try:
         main()
     except KeyboardInterrupt:
-        print _("\rUser break.")
+        print _("\rUser break.                                        ")
         sys.exit(1)