summaryrefslogtreecommitdiff
path: root/webob/acceptparse.py
diff options
context:
space:
mode:
authorSergey Schetinin <sergey@maluke.com>2011-09-24 13:00:00 +0300
committerSergey Schetinin <sergey@maluke.com>2011-09-24 13:00:00 +0300
commitefeeb38baf002ba9036e55490f0087c8b752e8a7 (patch)
tree70564130ba5be4d6d1749549a6feb3ada70ac990 /webob/acceptparse.py
parent627bdbe8d049f22ae2769d375de2928b35b85865 (diff)
downloadwebob-efeeb38baf002ba9036e55490f0087c8b752e8a7.tar.gz
remove unreachable code in first_match
Diffstat (limited to 'webob/acceptparse.py')
-rw-r--r--webob/acceptparse.py10
1 files changed, 0 insertions, 10 deletions
diff --git a/webob/acceptparse.py b/webob/acceptparse.py
index 36aded4..2569bc9 100644
--- a/webob/acceptparse.py
+++ b/webob/acceptparse.py
@@ -131,15 +131,6 @@ class Accept(object):
at the end of the match list then that will be returned.
"""
_warn_first_match()
- if not offers:
- raise ValueError("You must pass in a non-empty list")
- for offer in offers:
- if offer is None:
- return None
- for mask, quality in self._parsed_nonzero:
- if self._match(mask, offer):
- return offer
- return offers[0]
def best_match(self, offers, default_match=None):
"""
@@ -241,7 +232,6 @@ class NilAccept(object):
def first_match(self, offers):
_warn_first_match()
- return offers[0]
def best_match(self, offers, default_match=None):
best_quality = -1