Skip to content

Commit

Permalink
We don't use default_match, so remove it
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalresistor committed Apr 14, 2016
1 parent d5e3a7c commit bee098d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pyramid/httpexceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,8 @@ def prepare(self, environ):
accept_value = environ.get('HTTP_ACCEPT', '')
accept = MIMEAccept(accept_value)
# Attempt to match text/html or application/json, if those don't
# match, we will always have our default of text/plain
match = accept.best_match(['text/html', 'application/json'],
default_match='text/plain')
# match, we will fall through to defaulting to text/plain
match = accept.best_match(['text/html', 'application/json'])

if match == 'text/html':
self.content_type = 'text/html'
Expand Down

0 comments on commit bee098d

Please sign in to comment.