diff options
-rw-r--r-- | ryu/controller/handler.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ryu/controller/handler.py b/ryu/controller/handler.py index b3d40aed..a0782a12 100644 --- a/ryu/controller/handler.py +++ b/ryu/controller/handler.py @@ -86,9 +86,13 @@ def register_instance(i): i.register_handler(ev_cls, m) +def _is_method(f): + return inspect.isfunction(f) or inspect.ismethod(f) + + def get_dependent_services(cls): services = [] - for _k, m in inspect.getmembers(cls, inspect.ismethod): + for _k, m in inspect.getmembers(cls, _is_method): if _has_caller(m): for ev_cls, c in m.callers.items(): service = getattr(sys.modules[ev_cls.__module__], |