From b5a6fb5e13a7c62001f458d9ce7d7e02712dfd47 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Fri, 29 Oct 2010 04:19:48 +0300 Subject: [PATCH] QMod: stage2 --- gui/shipBrowser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/shipBrowser.py b/gui/shipBrowser.py index 0c7f9999d..64bb1a3ed 100644 --- a/gui/shipBrowser.py +++ b/gui/shipBrowser.py @@ -124,8 +124,8 @@ class ShipBrowser(wx.Panel): sMarket = service.Market.getInstance() sFit = service.Fit.getInstance() self.lpane.RemoveAllChildren() - - if categoryID not in self.stage2Cache: + content = self.stage2Cache.get(categoryID,None) + if not content: content = [] shipList = sMarket.getShipList(categoryID) shipList.sort(key=self.raceNameKey) @@ -136,7 +136,7 @@ class ShipBrowser(wx.Panel): self.stage2Cache[categoryID]= content else: count = 0 - for ID,name,fits,race in self.stage2Cache[categoryID]: + for ID,name,fits,race in content: dbfits = len(sFit.getFitsWithShip(ID)) if dbfits != fits: fits = dbfits