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:
Kaifeng Wang 2020-01-03 15:47:41 +08:00
parent 2a43e371f1
commit 373f428fc2

View File

@ -1,4 +1,4 @@
#!/usr/bin/python -tt
#!/usr/bin/python3
# Copyright (c) 2017 Intel Corporation
#
@ -45,10 +45,9 @@ def main():
action = sys.argv[2]
if action == "started":
interfaces = str(
subprocess.check_output(
interfaces = subprocess.check_output(
['ip', 'link', 'show', 'type', 'macvtap']
)).split("\n")
).decode().split("\n")
for iface_line in interfaces:
if 'macvtap' in iface_line:
iface_string = iface_line.split('@')