Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unreachable code in sanic.py middleware #25

Closed
powersjcb opened this issue Oct 15, 2016 · 1 comment
Closed

Unreachable code in sanic.py middleware #25

powersjcb opened this issue Oct 15, 2016 · 1 comment

Comments

@powersjcb
Copy link

powersjcb commented Oct 15, 2016

Unreachable code:

# sanic/sanic.py
 76         # Detect which way this was called, @middleware or @middleware('AT')
 77         if len(args) == 1 and len(kwargs) == 0 and callable(args[0]):
 78             return register_middleware(args[0])
 79         else:
 80             attach_to = args[0]
 81             return register_middleware
 82       ################################## ENDS HERE
 83         if isinstance(middleware, FunctionType):
 84             middleware = Middleware(process_request=middleware)
 85
 86         return middleware
@powersjcb powersjcb changed the title Unreachable code in sanic.py Unreachable code in sanic.py middleware Oct 15, 2016
@channelcat
Copy link
Contributor

Fixed, thanks!

sjsadowski pushed a commit that referenced this issue Oct 12, 2018
Merge upstream master branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants