realtime/scripts: Fix indentation error in parser.py
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
@@ -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
PATCH 1/1 realtime/scripts: Fix indentation error in parser.py
Hi Sharan,
Quoted 10 lines
An indentation error in
parser.pycauses certain blocks of code to run even before dependent variables are initialized when the code in this file is imported byparse-testpi1.pyorparse-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.
Thanks for your fix, merged!
It looks to me that 5a8408bc3 changed also whitespace in other files (it was done by 2to3 script), but these are IMHO correct.
BTW looking into realtime sources, the code is terrible. Not sure how relevant it is now.
Kind regards,
Petr