Avoid crashing during search on items w/o market group

Notify about these to stdout
This commit is contained in:
DarkPhoenix
2012-03-13 15:44:01 +04:00
parent 65978a9cff
commit b51a962075

View File

@@ -370,7 +370,11 @@ class ItemView(d.Display):
def itemSort(self, item):
sMkt = self.sMarket
catname = sMkt.getCategoryByItem(item).name
mktgrpid = sMkt.getMarketGroupByItem(item).ID
try:
mktgrpid = sMkt.getMarketGroupByItem(item).ID
except AttributeError:
mktgrpid = None
print "unable to find market group for", item.name
parentname = sMkt.getParentItemByItem(item).name
# Get position of market group
metagrpid = sMkt.getMetaGroupIdByItem(item)