From a697ce3f0598144f0b2d06e84a8a044731b77c90 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Mon, 12 May 2014 10:18:11 -0600 Subject: [PATCH] distributed: Allow None/False/True in AIR's MsgPack encoder. --- direct/src/distributed/AstronInternalRepository.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/direct/src/distributed/AstronInternalRepository.py b/direct/src/distributed/AstronInternalRepository.py index 86fe1d14de..0d2f25988d 100644 --- a/direct/src/distributed/AstronInternalRepository.py +++ b/direct/src/distributed/AstronInternalRepository.py @@ -26,7 +26,13 @@ def msgpack_length(dg, length, fix, maxfix, tag8, tag16, tag32): raise ValueError('Value too big for MessagePack') def msgpack_encode(dg, element): - if isinstance(element, (int, long)): + if element == None: + dg.addUint8(0xc0) + elif element == False: + dg.addUint8(0xc2) + elif element == True: + dg.addUint8(0xc3) + elif isinstance(element, (int, long)): if -32 <= element < 128: dg.addInt8(element) elif 128 <= element < 256: