Lines Matching refs:offer
114 def __contains__(self, offer): argument
120 if self._match(mask, offer):
123 def quality(self, offer, modifier=1): argument
130 if self._match(mask, offer):
162 for offer in offers:
163 if isinstance(offer, (tuple, list)):
164 offer, server_quality = offer
176 if self._match(mask, offer):
178 best_offer = offer
182 def _match(self, mask, offer): argument
183 _check_offer(offer)
184 return mask == '*' or offer.lower() == mask.lower()
220 def quality(self, offer, default_quality=1): argument
229 for offer in offers:
230 _check_offer(offer)
231 if isinstance(offer, (list, tuple)):
232 offer, quality = offer
236 best_offer = offer
299 def _match(self, mask, offer): argument
303 _check_offer(offer)
305 return offer.lower() == mask.lower()
311 offer_major = offer.split('/', 1)[0].lower()
318 def _check_offer(offer): argument
319 if '*' in offer:
320 raise ValueError("The application should offer specific types, got %r" % offer)