mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-05 04:16:11 +02:00
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>
This commit is contained in:
parent
134334137f
commit
9ad5a493af
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user