From 7486d75227703fb475560162a2e78100904735b8 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Thu, 1 Jul 2010 19:03:03 +0200 Subject: [PATCH] Remove _CheckBooleanOpField This is no longer used, and we can remove it. Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: Guido Trotter <ultrotter@google.com> --- lib/cmdlib.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index a8295fa0d..e0b78823c 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -719,20 +719,6 @@ def _CheckOutputFields(static, dynamic, selected): % ",".join(delta), errors.ECODE_INVAL) -def _CheckBooleanOpField(op, name): - """Validates boolean opcode parameters. - - This will ensure that an opcode parameter is either a boolean value, - or None (but that it always exists). - - """ - val = getattr(op, name, None) - if not (val is None or isinstance(val, bool)): - raise errors.OpPrereqError("Invalid boolean parameter '%s' (%s)" % - (name, str(val)), errors.ECODE_INVAL) - setattr(op, name, val) - - def _CheckGlobalHvParams(params): """Validates that given hypervisor params are not global ones. -- GitLab