Revision 906df9f1

b/src/Ganeti/Luxi.hs
156 156
     [ simpleField "flag" [t| Bool |] ]
157 157
    )
158 158
  , (luxiReqSetWatcherPause,
159
     [ simpleField "duration" [t| Double |] ]
159
     [ simpleField "duration" [t| Maybe Double |] ]
160 160
    )
161 161
  ])
162 162

  
......
288 288
              [flag] <- fromJVal args
289 289
              return $ SetDrainFlag flag
290 290
    ReqSetWatcherPause -> do
291
              [duration] <- fromJVal args
291
              let duration = case args of
292
                               JSArray [JSRational _ x] 
293
                                 -> Just (fromRational x :: Double)
294
                               _ -> Nothing
292 295
              return $ SetWatcherPause duration
293 296

  
294 297
-- | Check that luxi responses contain the required keys and that the

Also available in: Unified diff