Skip to content
Myr

clean up outdated code

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by linchiwei123 · committed by linchiwei123 · parent fb4aab5 · Browse files · 1 file+1 added−12 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−12 removed

  • other:+1 added−12 removed

1 file+1 added−12 removed

modified:src/flask/app.py+1 added-12 removed
21 unmodified lines
22from werkzeug.exceptions import BadRequestKeyError23from werkzeug.exceptions import default_exceptions24from werkzeug.exceptions import HTTPException25from werkzeug.exceptions import InternalServerError26from werkzeug.exceptions import MethodNotAllowed26from werkzeug.routing import BuildError27from werkzeug.routing import Map28from werkzeug.routing import RequestRedirect29from werkzeug.routing import RoutingException
1968 unmodified lines
19981999 .. versionadded:: 0.72000 """2001 adapter = _request_ctx_stack.top.url_adapter2003 if hasattr(adapter, "allowed_methods"):2004 methods = adapter.allowed_methods()2002 methods = adapter.allowed_methods()2005 else:2006 # fallback for Werkzeug < 0.72007 methods = []2008 try:2009 adapter.match(method="--")2010 except MethodNotAllowed as e:2011 methods = e.valid_methods2012 except HTTPException:2013 pass2003 rv = self.response_class()2004 rv.allow.update(methods)2005 return rv2006
449 unmodified lines