Fix KeyError : geo attribute can not exists
This commit is contained in:
@@ -82,7 +82,7 @@ class IWLADisplayTopGeo(IPlugin):
|
||||
|
||||
def hook(self):
|
||||
display = self.iwla.getDisplay()
|
||||
geo = self.iwla.getMonthStats()['geo']
|
||||
geo = self.iwla.getMonthStats().get('geo', {})
|
||||
geo = sorted(geo.items(), key=lambda t: t[1], reverse=True)
|
||||
self.valid_visitors = self.iwla.getValidVisitors()
|
||||
|
||||
|
Reference in New Issue
Block a user