From e0f9ed64672213b617ece4581f15dfd4221064cc Mon Sep 17 00:00:00 2001 From: Adeodato Simo Date: Thu, 2 Dec 2010 15:01:58 +0000 Subject: [PATCH] config.py: add error code to OpPrereqError This adds a errors.ECODE_NOENT for OpPrereqError in LookupNodeGroup. Signed-off-by: Adeodato Simo Signed-off-by: Iustin Pop Reviewed-by: Iustin Pop --- lib/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/config.py b/lib/config.py index dc373b1..6af89c0 100644 --- a/lib/config.py +++ b/lib/config.py @@ -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. -- 1.7.10.4