Commit e0f9ed64 authored by Adeodato Simo's avatar Adeodato Simo Committed by Iustin Pop
Browse files

config.py: add error code to OpPrereqError



This adds a errors.ECODE_NOENT for OpPrereqError in LookupNodeGroup.
Signed-off-by: default avatarAdeodato Simo <dato@google.com>
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 913cc25e
......@@ -886,7 +886,8 @@ class ConfigWriter:
for nodegroup in self._config_data.nodegroups.values():
if nodegroup.name == target:
return nodegroup.uuid
raise errors.OpPrereqError("Node group '%s' not found" % target)
raise errors.OpPrereqError("Node group '%s' not found" % target,
errors.ECODE_NOENT)
def _UnlockedGetNodeGroup(self, uuid):
"""Lookup a node group.
......
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