diff options
author | Fadi Moukayed <smfadi@gmail.com> | 2015-08-06 14:07:26 +0200 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-08-10 10:54:11 +0900 |
commit | 3706eec9bc1e6585912339efc0f6be3c2817c903 (patch) | |
tree | 06e79d371d149b0290938630c3ef8d2946d32343 | |
parent | 45c14ec59be74546feed8eef73de9cb617cc614d (diff) |
Python 3: Fix search for bound methods
Signed-off-by: Fadi Moukayed <smfadi@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-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__], |