diff options
author | YAMAMOTO Takashi <yamamoto@valinux.co.jp> | 2013-03-13 15:18:21 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2013-03-18 07:57:59 +0900 |
commit | 9ad5a493af51c755b5aba8ced0aa30b59798aa94 (patch) | |
tree | 78e4b6d6563cb6a88139c5d3ffaaf95d4bdc6923 | |
parent | 134334137f26e53bdacd43e9660ca3700dbab230 (diff) |
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 <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/lib/ovs/vsctl.py | 6 |
1 files 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 |