Merge branch 'stable-2.16' into stable-2.17
[ganeti-github.git] / tools / move-instance
index 32474d5..5f33363 100755 (executable)
@@ -51,8 +51,6 @@ from ganeti import compat
 from ganeti import rapi
 from ganeti import errors
 
-import ganeti.rapi.client # pylint: disable=W0611
-import ganeti.rapi.client_utils
 from ganeti.rapi.client import UsesRapiClient
 
 
@@ -416,7 +414,7 @@ class MoveRuntime(object):
       errmsg = None
     except Abort:
       errmsg = "Aborted"
-    except Exception, err:
+    except Exception, err:  # pylint: disable=W0703
       logging.exception("Caught unhandled exception")
       errmsg = str(err)
 
@@ -945,9 +943,9 @@ def _CheckInstanceOptions(parser, options, instance_names):
       options.nics = cli.ParseNicOption(options.nics)
   else:
     # Moving more than one instance
-    if (options.dest_instance_name or options.dest_primary_node or
-        options.dest_secondary_node or options.hvparams or
-        options.beparams or options.osparams or options.nics):
+    if compat.any(options.dest_instance_name, options.dest_primary_node,
+                  options.dest_secondary_node, options.hvparams,
+                  options.beparams, options.osparams, options.nics):
       parser.error("The options --dest-instance-name, --dest-primary-node,"
                    " --dest-secondary-node, --hypervisor-parameters,"
                    " --backend-parameters, --os-parameters and --net can"