Signed-off-by: YAMAMOTO Takashi <[email protected]>
---
 ryu/controller/ofp_event.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/ryu/controller/ofp_event.py b/ryu/controller/ofp_event.py
index 2175e50..43e7113 100644
--- a/ryu/controller/ofp_event.py
+++ b/ryu/controller/ofp_event.py
@@ -40,8 +40,12 @@ def _ofp_msg_name_to_ev_name(msg_name):
 
 
 def ofp_msg_to_ev(msg):
-    name = _ofp_msg_name_to_ev_name(msg.__class__.__name__)
-    return _OFP_MSG_EVENTS[name](msg)
+    return ofp_msg_to_ev_cls(msg.__class__)(msg)
+
+
+def ofp_msg_to_ev_cls(msg_cls):
+    name = _ofp_msg_name_to_ev_name(msg_cls.__name__)
+    return _OFP_MSG_EVENTS[name]
 
 
 def _create_ofp_msg_ev_class(msg_cls):
-- 
1.8.3.1


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to