Skip to contentSkip to conversation

realtime/scripts: Fix indentation error in parser.py

PATCH New Sharan Turlapati 1 participant 1 message Mar 25, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 realtime/scripts: Fix indentation error in parser.py

An indentation error in parser.py causes certain blocks of code to run even before dependent variables are initialized when the code in this file is imported by parse-testpi1.py or parse-testpi2.py.

Post running tests like testpi-2 or testpi-4, the results of these tests are parsed and added to the logs/ directory. This bug prevents the results of such tests from being parsed and thus masks the results of these tests.

---
 testcases/realtime/scripts/parser.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
testcases/realtime/scripts/parser.py +5 -5
index 85226deb6..2acbe7d67 100644
@@ -33,15 +33,15 @@ class Log:
 	def __init__(self,filename):
 		if filename:
 			log_file=filename
-	try:
-		self.__log_file = open(log_file, "r")
-	except IOError as errmsg:
-		sys.exit(errmsg)
+		try:
+			self.__log_file = open(log_file, "r")
+		except IOError as errmsg:
+			sys.exit(errmsg)
 
 	def read(self):
 		for line in self.__log_file.read().split("\n"):
 			yield line
-	self.__log_file.close()
+		self.__log_file.close()
 
 	def eval(self):
 		pass
Signature · 1 line
2.28.0