Skip to content

Commit fa4535d

Browse files
author
MarcoFalke
committed
[qa] combine_logs: Use ordered list for logfiles
1 parent a0b1e57 commit fa4535d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/functional/combine_logs.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
import argparse
88
from collections import defaultdict, namedtuple
9-
import glob
109
import heapq
10+
import itertools
1111
import os
1212
import re
1313
import sys
@@ -49,7 +49,10 @@ def read_logs(tmp_dir):
4949
for each of the input log files."""
5050

5151
files = [("test", "%s/test_framework.log" % tmp_dir)]
52-
for i, logfile in enumerate(glob.glob("%s/node*/regtest/debug.log" % tmp_dir)):
52+
for i in itertools.count():
53+
logfile = "{}/node{}/regtest/debug.log".format(tmp_dir, i)
54+
if not os.path.isfile(logfile):
55+
break
5356
files.append(("node%d" % i, logfile))
5457

5558
return heapq.merge(*[get_log_events(source, f) for source, f in files])

0 commit comments

Comments
 (0)