LGTM, thanks

On Wed, Dec 12, 2012 at 11:28 AM, Iustin Pop <ius...@google.com> wrote:

> It seems that Python code generates (sometimes) absolute job
> dependencies which are strings, instead of integers, so we should be
> able to parse these as well. We simply change from explicit int-based
> parsing (makeJobId) to the generic one (parseJobId).
>
> Signed-off-by: Iustin Pop <ius...@google.com>
> ---
>  htools/Ganeti/Types.hs |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/htools/Ganeti/Types.hs b/htools/Ganeti/Types.hs
> index 6a36414..3c7838e 100644
> --- a/htools/Ganeti/Types.hs
> +++ b/htools/Ganeti/Types.hs
> @@ -436,9 +436,7 @@ instance JSON.JSON JobIdDep where
>      case JSON.readJSON v::JSON.Result (Negative Int) of
>        -- first try relative dependency, usually most common
>        JSON.Ok r -> return $ JobDepRelative r
> -      JSON.Error _ -> liftM JobDepAbsolute
> -                      (fromJResult "parsing absolute job id" (readJSON v)
> >>=
> -                       makeJobId)
> +      JSON.Error _ -> liftM JobDepAbsolute (parseJobId v)
>
>  -- | Job Dependency type.
>  data JobDependency = JobDependency JobIdDep [FinalizedJobStatus]
> --
> 1.7.10.4
>
>

Reply via email to