* [LTP] [PATCH] realtime/scripts: Fix indentation error in parser.py
@ 2021-03-29 18:17 Sharan Turlapati
2021-04-01 6:35 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Sharan Turlapati @ 2021-03-29 18:17 UTC (permalink / raw)
To: ltp
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.
Signed-off-by: Sharan Turlapati <sturlapati@vmware.com>
---
testcases/realtime/scripts/parser.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/testcases/realtime/scripts/parser.py b/testcases/realtime/scripts/parser.py
index 85226deb6..2acbe7d67 100644
--- a/testcases/realtime/scripts/parser.py
+++ b/testcases/realtime/scripts/parser.py
@@ -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
--
2.28.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [LTP] [PATCH] realtime/scripts: Fix indentation error in parser.py
2021-03-29 18:17 [LTP] [PATCH] realtime/scripts: Fix indentation error in parser.py Sharan Turlapati
@ 2021-04-01 6:35 ` Petr Vorel
0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2021-04-01 6:35 UTC (permalink / raw)
To: ltp
Hi Sharan,
> 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.
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [LTP] [PATCH] realtime/scripts: Fix indentation error in parser.py
@ 2021-03-25 18:21 Sharan Turlapati
0 siblings, 0 replies; 3+ messages in thread
From: Sharan Turlapati @ 2021-03-25 18:21 UTC (permalink / raw)
To: ltp
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.
Signed-off-by: Sharan Turlapati <sturlapati@vmware.com>
---
testcases/realtime/scripts/parser.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/testcases/realtime/scripts/parser.py b/testcases/realtime/scripts/parser.py
index 85226deb6..2acbe7d67 100644
--- a/testcases/realtime/scripts/parser.py
+++ b/testcases/realtime/scripts/parser.py
@@ -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
--
2.28.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-01 6:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-29 18:17 [LTP] [PATCH] realtime/scripts: Fix indentation error in parser.py Sharan Turlapati
2021-04-01 6:35 ` Petr Vorel
-- strict thread matches above, loose matches on Subject: below --
2021-03-25 18:21 Sharan Turlapati
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox