Make qemu hook running with python3
This switches the piece of code turns on multicast [1] to run with python3. [1] https://review.opendev.org/#/c/665221 Change-Id: I12d3764d087fa19aca5b285cbd63a19b1770bb41
This commit is contained in:
parent
2a43e371f1
commit
373f428fc2
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python -tt
|
#!/usr/bin/python3
|
||||||
|
|
||||||
# Copyright (c) 2017 Intel Corporation
|
# Copyright (c) 2017 Intel Corporation
|
||||||
#
|
#
|
||||||
@ -45,10 +45,9 @@ def main():
|
|||||||
action = sys.argv[2]
|
action = sys.argv[2]
|
||||||
|
|
||||||
if action == "started":
|
if action == "started":
|
||||||
interfaces = str(
|
interfaces = subprocess.check_output(
|
||||||
subprocess.check_output(
|
['ip', 'link', 'show', 'type', 'macvtap']
|
||||||
['ip', 'link', 'show', 'type', 'macvtap']
|
).decode().split("\n")
|
||||||
)).split("\n")
|
|
||||||
for iface_line in interfaces:
|
for iface_line in interfaces:
|
||||||
if 'macvtap' in iface_line:
|
if 'macvtap' in iface_line:
|
||||||
iface_string = iface_line.split('@')
|
iface_string = iface_line.split('@')
|
||||||
|
Loading…
Reference in New Issue
Block a user