Prevent test code crash due to no log data

Former-commit-id: 0a56a73bd98d4e692ae77683fdb9dd644ecfc2eb
This commit is contained in:
John Sully 2021-06-14 22:06:36 +00:00
parent 40a5f86dad
commit 1554161bdc

View File

@ -39,6 +39,7 @@ proc show_cluster_status {} {
# all the lists are empty.
#
# regexp {^[0-9]+:[A-Z] [0-9]+ [A-z]+ [0-9]+ ([0-9:.]+) .*} $l - logdate
catch {
while 1 {
# Find the log with smallest time.
set empty 0
@ -67,6 +68,7 @@ proc show_cluster_status {} {
puts "\[$best port $R_port($best)\] [lindex $log($best) 0]"
set log($best) [lrange $log($best) 1 end]
}
}
}
}