diff --git a/utils/raspberrypi/ctt/ctt_pretty_print_json.py b/utils/raspberrypi/ctt/ctt_pretty_print_json.py
index 63b042de58d4..fac9e98ba9dd 100644
--- a/utils/raspberrypi/ctt/ctt_pretty_print_json.py
+++ b/utils/raspberrypi/ctt/ctt_pretty_print_json.py
@@ -17,7 +17,8 @@ def print_newline(fout, state):
 
 def process_char(c, fout, state):
     if c == '{':
-        if not state["skipnewline"]: print_newline(fout, state)
+        if not state["skipnewline"]:
+            print_newline(fout, state)
         fout.write(c)
         state["indent"] += 1
         print_newline(fout, state)
