- run_command's timeout argument is named 'timeout_msec', but
  all callers seem to pass the value in second.  so rename
  the argument to 'timeout_sec'.

- gevent.Timeout takes a timeout value in second.
  remove a conversion, which seems wrong even if the argument was in ms.

Signed-off-by: YAMAMOTO Takashi <yamam...@valinux.co.jp>
---
 ryu/lib/ovs/vsctl.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ryu/lib/ovs/vsctl.py b/ryu/lib/ovs/vsctl.py
index 4269141..8cada74 100644
--- a/ryu/lib/ovs/vsctl.py
+++ b/ryu/lib/ovs/vsctl.py
@@ -998,11 +998,11 @@ class VSCtl(object):
             command._prerequisite, command._run = funcs
         self._do_main(commands)
 
-    def run_command(self, commands, timeout_msec=None, exception=None):
-        if timeout_msec is None:
+    def run_command(self, commands, timeout_sec=None, exception=None):
+        if timeout_sec is None:
             self._run_command(commands)
         else:
-            with gevent.Timeout(timeout_msec * 1000, exception):
+            with gevent.Timeout(timeout_sec, exception):
                 self._run_command(commands)
 
     # commands
-- 
1.8.0.1


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to