Skip to content

Commit f0c0d12

Browse files
authored
remove the missing branches after the loop (#105)
1 parent da6d21d commit f0c0d12

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

report.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,22 @@
3939
nsimulate = {}
4040
exectime = {}
4141

42+
missing_branches = []
4243
for branch in branches:
4344
try:
4445
cursor.execute("SELECT date FROM [%s] ORDER BY date DESC LIMIT 1" % branch)
4546
one = cursor.fetchone()
4647
if one == None:
4748
print("No such table '%s'; specify it using --branch=XXX when running test.py" % branch)
4849
# ignore this table and continue
49-
branches.remove(branch)
50+
missing_branches.append(branch)
5051
continue
5152
else:
5253
v = one[0]
5354
except:
5455
print("No such table '%s'; specify it using --branch=XXX when running test.py" % branch)
5556
# ignore this table and continue
56-
branches.remove(branch)
57+
missing_branches.append(branch)
5758
continue
5859

5960
dates_str[branch] = str(datetime.datetime.fromtimestamp(v).strftime('%Y-%m-%d %H:%M:%S'))
@@ -78,6 +79,9 @@
7879
exectime[branch] = 0.0
7980

8081
entries = ""
82+
# removing missing branches
83+
for branch in missing_branches:
84+
branches.remove(branch)
8185

8286
def checkEqual(iterator):
8387
return len(set(iterator)) <= 1

0 commit comments

Comments
 (0)