From e546c1b812aa6f52646a151502f21eec9e6f35fb Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Fri, 24 Feb 2012 14:37:28 +0900 Subject: ryu/controller/ofp_event: use utils.load_module Signed-off-by: Isaku Yamahata Signed-off-by: FUJITA Tomonori --- ryu/controller/ofp_event.py | 6 +++--- 1 file 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 -- cgit v1.2.3