aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/gats.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/gats.py b/python/gats.py
index 40139a2..22463ab 100644
--- a/python/gats.py
+++ b/python/gats.py
@@ -146,6 +146,8 @@ def _readObj( sIn ):
146 return 0.0 146 return 0.0
147 else: 147 else:
148 raise Exception('Invalid exceptional float subtype found.') 148 raise Exception('Invalid exceptional float subtype found.')
149 elif t == 'n':
150 return None
149 elif t == 'e': # End marker 151 elif t == 'e': # End marker
150 return None 152 return None
151 else: 153 else:
@@ -153,7 +155,9 @@ def _readObj( sIn ):
153 return 'not implemented yet'; 155 return 'not implemented yet';
154 156
155def _writeObj( obj, sOut ): 157def _writeObj( obj, sOut ):
156 if isinstance( obj, bool ): 158 if obj is None:
159 sOut.write('n')
160 elif isinstance( obj, bool ):
157 if obj == True: 161 if obj == True:
158 sOut.write('1') 162 sOut.write('1')
159 else: 163 else: