Prechádzať zdrojové kódy

qvm-check: s/stdout/stderr/

Jean-Philippe Ouellet 7 rokov pred
rodič
commit
7033f6a796
1 zmenil súbory, kde vykonal 5 pridanie a 5 odobranie
  1. 5 5
      qvm-tools/qvm-check

+ 5 - 5
qvm-tools/qvm-check

@@ -52,30 +52,30 @@ Specify no state options to check if VM exists"""
     vm = qvm_collection.get_vm_by_name(vmname)
     if vm is None:
         if options.verbose:
-            print >> sys.stdout, "A VM with the name '{0}' does not exist in the system!".format(vmname)
+            print >> sys.stderr, "A VM with the name '{0}' does not exist in the system!".format(vmname)
         exit(1)
 
     elif options.running:
         vm_state = not vm.is_running()
         if options.verbose:
-            print >> sys.stdout, "A VM with the name {0} is {1}running.".format(vmname, "not " * vm_state)
+            print >> sys.stderr, "A VM with the name {0} is {1}running.".format(vmname, "not " * vm_state)
         exit(vm_state)
 
     elif options.paused:
         vm_state = not vm.is_paused()
         if options.verbose:
-            print >> sys.stdout, "A VM with the name {0} is {1}paused.".format(vmname, "not " * vm_state)
+            print >> sys.stderr, "A VM with the name {0} is {1}paused.".format(vmname, "not " * vm_state)
         exit(vm_state)
 
     elif options.template:
         vm_state = not vm.is_template()
         if options.verbose:
-            print >> sys.stdout, "A VM with the name {0} is {1}a template.".format(vmname, "not " * vm_state)
+            print >> sys.stderr, "A VM with the name {0} is {1}a template.".format(vmname, "not " * vm_state)
         exit(vm_state)
 
     else:
         if options.verbose:
-            print >> sys.stdout, "A VM with the name '{0}' does exist.".format(vmname)
+            print >> sys.stderr, "A VM with the name '{0}' does exist.".format(vmname)
         exit(0)
 
 main()