Fix faulty comments / indentation
authorHrvoje Ribicic <riba@google.com>
Wed, 16 Sep 2015 13:23:59 +0000 (15:23 +0200)
committerHrvoje Ribicic <riba@google.com>
Wed, 16 Sep 2015 13:39:10 +0000 (15:39 +0200)
As a part of patch 6b16d04a318d33a59, some errors were inadvertently
introduced by adding documentation. This patch fixes them.

Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

lib/hypervisor/hv_xen.py

index a3f7af8..e72dadb 100644 (file)
@@ -225,13 +225,13 @@ def _IsInstanceRunning(instance_info):
   def _RunningWithSuffix(suffix):
     return map(lambda x: x + suffix, allowable_running_prefixes)
 
+  # The shutdown suspend ("ss") state is encountered during migration, where
+  # the instance is still considered to be running.
+  # The shutdown restart ("sr") is probably encountered during restarts - still
+  # running.
+  # See Xen commit e1475a6693aac8cddc4bdd456548aa05a625556b
   return instance_info in _RunningWithSuffix("---") \
-      # The shutdown suspend state is encountered during migration, where the
-      # instance is still considered to be running.
-      # See Xen commit e1475a6693aac8cddc4bdd456548aa05a625556b
       or instance_info in _RunningWithSuffix("ss-") \
-      # The shutdown restart state is probably encountered during reboots.
-      # See the Xen commit above.
       or instance_info in _RunningWithSuffix("sr-") \
       or instance_info == "-----d"