Fix ovs-vsctl executed in worlddump.py failed issue

add sudo before ovs-vsctl command.

Change-Id: I1a7dd9504da766beb452bd749e325931678de64e
Closes-Bug: #1576560
This commit is contained in:
yan.haifeng 2016-04-29 15:59:56 +08:00 committed by Haifeng Yan
parent 251b870e85
commit 6ba17f7d01

View File

@ -88,7 +88,8 @@ def _header(name):
def _bridge_list():
process = subprocess.Popen(['ovs-vsctl', 'list-br'], stdout=subprocess.PIPE)
process = subprocess.Popen(['sudo', 'ovs-vsctl', 'list-br'],
stdout=subprocess.PIPE)
stdout, _ = process.communicate()
return stdout.split()