Skip to content

Commit ce3dcf7

Browse files
committed
bugfix in failed matches report
1 parent 1cf2d27 commit ce3dcf7

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

archive/ukmon_pylib/reports/findFailedMatches.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ def saveData(observation, repfile):
1616

1717

1818
def processOneLog(logfile, repfile):
19-
with open(logfile, 'r') as inf:
20-
lis = inf.readlines()
19+
lis = open(logfile, 'r').readlines()
2120

2221
obs = False
2322
observation = []
@@ -29,8 +28,10 @@ def processOneLog(logfile, repfile):
2928
if 'Shower:' in li:
3029
obs = False
3130
observation = []
32-
if '-----------------------' in li:
31+
if '--------------------' in li:
3332
if obs is True:
33+
observation.append(li)
34+
print('got fail')
3435
saveData(observation, repfile)
3536
obs = False
3637
observation = []
@@ -48,5 +49,6 @@ def processOneLog(logfile, repfile):
4849
logdir = os.path.join(srcdir, 'logs','distrib')
4950
logs = glob.glob(f'{repdt}*.log', root_dir=logdir)
5051
for logf in logs:
52+
print(logf)
5153
processOneLog(os.path.join(logdir, logf), reportfile)
5254
reportfile.close()

0 commit comments

Comments
 (0)