[Piglit] [PATCH 2/2] core.py: Fix bug in JSONWriter.write_dict_key method

Dylan Baker baker.dylan.c at gmail.com
Wed Aug 28 14:24:23 PDT 2013


Curretnly write_dict_key sets the indent level one in before writing,
and then sets it back imediatly after finishing, which is incorrect
since the indent was already previous set. This cuased anything written
by the write_dict_key method to be double indented. This removes that
behavior.

Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
---
 framework/core.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/framework/core.py b/framework/core.py
index b1a5726..a824d09 100644
--- a/framework/core.py
+++ b/framework/core.py
@@ -160,9 +160,7 @@ class JSONWriter:
         self.write_dict_key(key)
 
         # Write value.
-        self.__indent_level += 1
         self.__write(value)
-        self.__indent_level -= 1
 
     @synchronized_self
     def write_dict_key(self, key):
-- 
1.8.1.5



More information about the Piglit mailing list