diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2012-02-24 14:37:28 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2012-03-01 09:06:15 +0900 |
commit | e546c1b812aa6f52646a151502f21eec9e6f35fb (patch) | |
tree | 7e5b115c8bc4793df8e54342bd22f212cccaaf30 | |
parent | de4c84884417430c597f33c2ec6a54a47c110049 (diff) |
ryu/controller/ofp_event: use utils.load_module
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/controller/ofp_event.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ryu/controller/ofp_event.py b/ryu/controller/ofp_event.py index 7fb37efd..a0b3a14b 100644 --- a/ryu/controller/ofp_event.py +++ b/ryu/controller/ofp_event.py @@ -15,6 +15,7 @@ import inspect +from ryu import utils from . import event @@ -55,9 +56,8 @@ def _create_ofp_msg_ev_class(msg_cls): def _create_ofp_msg_ev_from_module(modname): - (f, _s, _t) = modname.rpartition('.') - mod = __import__(modname, fromlist=[f]) - print mod + mod = utils.import_module(modname) + # print mod for _k, cls in mod.__dict__.items(): if not inspect.isclass(cls): continue |