Commit 4c4b5058 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix two bugs in seldom-used codepaths

New version of pylint, new bugs found!
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarOlivier Tharan <>
parent 80f3f415
......@@ -5218,7 +5218,8 @@ class LUReplaceDisks(LogicalUnit):
if len(ial.nodes) != ial.required_nodes:
raise errors.OpPrereqError("iallocator '%s' returned invalid number"
" of nodes (%s), required %s" %
(len(ial.nodes), ial.required_nodes))
len(ial.nodes), ial.required_nodes))
self.op.remote_node = ial.nodes[0]
self.LogInfo("Selected new secondary for the instance: %s",
......@@ -68,7 +68,7 @@ class FakeHypervisor(hv_base.BaseHypervisor):
inst_id = fh.readline().strip()
memory = utils.TryConvert(int, fh.readline().strip())
vcpus = utils.TryConvert(fh.readline().strip())
vcpus = utils.TryConvert(int, fh.readline().strip())
stat = "---b-"
times = "0"
return (instance_name, inst_id, memory, vcpus, stat, times)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment