From 489bcb34470cbc4c4615378deaf07c1fba050189 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 25 Oct 2014 17:06:44 +0800 Subject: [PATCH] pyon: add bool support --- artiq/management/pyon.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/artiq/management/pyon.py b/artiq/management/pyon.py index 3465ae0e2..25e4f22ce 100644 --- a/artiq/management/pyon.py +++ b/artiq/management/pyon.py @@ -7,6 +7,13 @@ def _encode_none(x): return "None" +def _encode_bool(x): + if x: + return "True" + else: + return "False" + + def _encode_number(x): return str(x) @@ -50,6 +57,7 @@ def _encode_nparray(x): _encode_map = { type(None): _encode_none, + bool: _encode_bool, int: _encode_number, float: _encode_number, str: _encode_str,