From 9ad5a493af51c755b5aba8ced0aa30b59798aa94 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Wed, 13 Mar 2013 15:18:21 +0900 Subject: vsctl: fix timeout - 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 Signed-off-by: FUJITA Tomonori --- 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 4269141d..8cada742 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 -- cgit v1.2.3