Fixes escaped line breaks

Bug: webrtc:13607
Change-Id: I24c252ecb6d443abb8206e752bdff73ee5084807
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252260
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@google.com>
Cr-Commit-Position: refs/heads/main@{#36056}
diff --git a/tools_webrtc/gn_check_autofix.py b/tools_webrtc/gn_check_autofix.py
index f55d125..88ba0cc 100644
--- a/tools_webrtc/gn_check_autofix.py
+++ b/tools_webrtc/gn_check_autofix.py
@@ -55,7 +55,10 @@
 
 def Run(cmd):
   print('Running:', ' '.join(cmd))
-  sub = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+  sub = subprocess.Popen(cmd,
+                         stdout=subprocess.PIPE,
+                         stderr=subprocess.PIPE,
+                         universal_newlines=True)
   return sub.communicate()
 
 
@@ -155,14 +158,14 @@
     ] + sys.argv[1:])
 
   mb_output = Run(mb_gen_command)
-  errors = mb_output[0].decode('utf-8').split('ERROR')[1:]
+  errors = mb_output[0].split('ERROR')[1:]
 
   if mb_output[1]:
     print(mb_output[1])
     return 1
 
   for error in errors:
-    error = error.splitlines()
+    error = error.split('\\n')
     target_msg = 'The target:'
     if target_msg not in error:
       target_msg = 'It is not in any dependency of'