this patch shut up the warning shown below

/home/wataru/etc/bgpconf01.py:1: RuntimeWarning: Parent module
'bgpspeaker' not found while handling absolute import
  import os

Signed-off-by: ISHIDA Wataru <[email protected]>
---
 ryu/services/protocols/bgp/application.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ryu/services/protocols/bgp/application.py 
b/ryu/services/protocols/bgp/application.py
index b803d36..786c1ed 100644
--- a/ryu/services/protocols/bgp/application.py
+++ b/ryu/services/protocols/bgp/application.py
@@ -124,14 +124,14 @@ class RyuBGPSpeaker(RyuApp):
     def load_config(self, config_file):
         """Validates give file as settings file for BGPSpeaker.

-        Load the configuration from file as bgpspeaker.setting module.
+        Load the configuration from file as settings module.
         """
         if not config_file or not isinstance(config_file, str):
             raise ApplicationException('Invalid configuration file.')

         # Check if file can be read
         try:
-            return imp.load_source('bgpspeaker.settings', config_file)
+            return imp.load_source('settings', config_file)
         except Exception as e:
             raise ApplicationException(desc=str(e))

-- 
1.7.10.4




------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to