Corona: ensure --top10 results are countries

This commit is contained in:
oddluck 2020-03-29 00:40:47 +00:00
parent 129de1972f
commit 5e8a7272da

View File

@ -588,7 +588,7 @@ class Corona(callbacks.Plugin):
for country in self.data:
if n > 10:
break
if self.data[country]['rank'] == "#{0}".format(n):
if self.data[country]['country'] and self.data[country]['rank'] == "#{0}".format(n):
reply += " {0}: \x1F{1}\x1F (\x0307{2}\x03/\x0304{3}\x03),".format(
self.data[country]['rank'],
self.data[country]['name'],