Skip to content

Commit

Permalink
added missing decorator return values (fixes #149)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Oct 8, 2015
1 parent 8284a2d commit 376a132
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flask_socketio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def _handler(sid, *args):
if namespace not in self.handlers:
self.handlers[namespace] = {}
self.handlers[namespace][message] = _handler
return _handler
return decorator

def on_error(self, namespace=None):
Expand All @@ -159,6 +160,7 @@ def decorator(exception_handler):
if not callable(exception_handler):
raise ValueError('exception_handler must be callable')
self.exception_handlers[namespace] = exception_handler
return exception_handler
return decorator

def on_error_default(self, exception_handler):
Expand All @@ -175,6 +177,7 @@ def error_handler(e):
if not callable(exception_handler):
raise ValueError('exception_handler must be callable')
self.default_exception_handler = exception_handler
return exception_handler

def emit(self, event, *args, **kwargs):
"""Emit a server generated SocketIO event.
Expand Down

0 comments on commit 376a132

Please sign in to comment.