This small patchset restores the example applications within the app/*
directory to a working condition under Python 3, with the exception of
those depending on the still-unported OVS bindings (Sorry about the
previous submission, I forgot to check it for PEP8 compliance).

I would appreciate any feedback. I have also began work on a
preliminary Python 3 port of the OVS bindings and I am willing to
submit my changes if there is any interest.

Greetings,
-Fadi

2015-08-06 14:07 GMT+02:00 Fadi Moukayed <[email protected]>:
> Signed-off-by: Fadi Moukayed <[email protected]>
> ---
>  ryu/controller/handler.py | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/ryu/controller/handler.py b/ryu/controller/handler.py
> index b3d40ae..a0782a1 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__],
> --
> 1.9.1
>

------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to