Commit eb0aa4e5 authored by Bernardo Dal Seno's avatar Bernardo Dal Seno
Browse files

Don't catch an exception that cannot be raised

Since 9b221ea4

, _CreateBlockDev() doesn't raise OpExecError any more. Yet
some code was left in place to catch it. By removing that code we have two
1. Dead code is removed.
2. If for whatever reason _CreateBlockDev() raises OpExecError, the
   exception is not silently dropped and we notice (so we can fix it).
Signed-off-by: default avatarBernardo Dal Seno <>
Reviewed-by: default avatarGuido Trotter <>
parent 57bcb172
......@@ -9733,9 +9733,6 @@ def _CreateDisks(lu, instance, to_skip=None, target_node=None):
_CreateBlockDev(lu, node, instance, device, f_create, info, f_create)
disks_created.append((node, device))
except errors.OpExecError:
logging.warning("Creating disk %s for instance '%s' failed",
except errors.DeviceCreationError, e:
logging.warning("Creating disk %s for instance '%s' failed",
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