LGTM, thanks.

On Tue, Feb 18, 2014 at 3:39 PM, Hrvoje Ribicic <[email protected]> wrote:

> The previous version of the LUTestDelay opcode relied on the utility
> function complaining about the negative duration. As this function has
> been removed for now, do the check ourselves, and issue a more
> appropriate exception.
>
> Signed-off-by: Hrvoje Ribicic <[email protected]>
> ---
>  lib/cmdlib/test.py | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/lib/cmdlib/test.py b/lib/cmdlib/test.py
> index 8201d65..a4cd3d2 100644
> --- a/lib/cmdlib/test.py
> +++ b/lib/cmdlib/test.py
> @@ -52,6 +52,10 @@ class LUTestDelay(NoHooksLU):
>      This expands the node list, if any.
>
>      """
> +
> +    if self.op.duration <= 0:
> +      raise errors.OpPrereqError("Duration must be greater than zero")
> +
>      self.op.on_node_uuids = []
>      if self.op.on_nodes:
>        # _GetWantedNodes can be used here, but is not always appropriate
> to use
> --
> 1.9.0.rc1.175.g0b1dcb5
>
>

Reply via email to