Python code sometimes sends this, so let's support it even though it's
non-standard.

Signed-off-by: Iustin Pop <ius...@google.com>
---
 htools/Ganeti/Luxi.hs |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/htools/Ganeti/Luxi.hs b/htools/Ganeti/Luxi.hs
index 65132e0..ff39892 100644
--- a/htools/Ganeti/Luxi.hs
+++ b/htools/Ganeti/Luxi.hs
@@ -324,8 +324,10 @@ decodeCall (LuxiCall call args) =
   case call of
     ReqQueryJobs -> do
               (jids, jargs) <- fromJVal args
-              let rargs = map fromJSString jargs
-              return $ QueryJobs jids rargs
+              jids' <- case jids of
+                         JSNull -> return []
+                         _ -> fromJVal jids
+              return $ QueryJobs jids' jargs
     ReqQueryInstances -> do
               (names, fields, locking) <- fromJVal args
               return $ QueryInstances names fields locking
-- 
1.7.10.4

Reply via email to