def _updateTankExpert(dossierDescr, dossierBlockDescr, key, value): cache = getCache() killedVehTypes = set(dossierBlockDescr.iterkeys()) vehiclesInTrees = cache['vehiclesInTrees'] if key not in vehiclesInTrees: return if not bool(vehiclesInTrees - killedVehTypes): dossierDescr['achievements']['tankExpert'] = True dossierDescr.addPopUp('achievements', 'tankExpert', True) nationID = getVehicleNationID(key) if not bool(cache['vehiclesInTreesByNation'][nationID] - killedVehTypes): record = ''.join(['tankExpert', str(nationID)]) dossierDescr['achievements'][record] = True dossierDescr.addPopUp('achievements', record, True)