diff options
Diffstat (limited to '')
-rw-r--r-- | python/gats.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/python/gats.py b/python/gats.py index 760314a..40139a2 100644 --- a/python/gats.py +++ b/python/gats.py | |||
@@ -153,7 +153,12 @@ def _readObj( sIn ): | |||
153 | return 'not implemented yet'; | 153 | return 'not implemented yet'; |
154 | 154 | ||
155 | def _writeObj( obj, sOut ): | 155 | def _writeObj( obj, sOut ): |
156 | if isinstance( obj, int ): | 156 | if isinstance( obj, bool ): |
157 | if obj == True: | ||
158 | sOut.write('1') | ||
159 | else: | ||
160 | sOut.write('0') | ||
161 | elif isinstance( obj, int ): | ||
157 | sOut.write('i') | 162 | sOut.write('i') |
158 | _writePackedInt( obj, sOut ) | 163 | _writePackedInt( obj, sOut ) |
159 | elif isinstance( obj, str ): | 164 | elif isinstance( obj, str ): |
@@ -171,11 +176,6 @@ def _writeObj( obj, sOut ): | |||
171 | _writeObj( key, sOut ) | 176 | _writeObj( key, sOut ) |
172 | _writeObj( obj[key], sOut ) | 177 | _writeObj( obj[key], sOut ) |
173 | sOut.write('e') | 178 | sOut.write('e') |
174 | elif isinstance( obj, bool ): | ||
175 | if obj == True: | ||
176 | sOut.write('1') | ||
177 | else: | ||
178 | sOut.write('0') | ||
179 | elif isinstance( obj, float ): | 179 | elif isinstance( obj, float ): |
180 | if math.isnan( obj ): | 180 | if math.isnan( obj ): |
181 | if math.copysign( 1.0, obj ) < 0.0: | 181 | if math.copysign( 1.0, obj ) < 0.0: |