diff options
author | Kaifeng Wang <kaifeng.w@gmail.com> | 2020-01-03 15:47:41 +0800 |
---|---|---|
committer | Kaifeng Wang <kaifeng.w@gmail.com> | 2020-01-07 09:29:59 +0800 |
commit | 373f428fc2c6e258baa3ba7078ead96fde305d8c (patch) | |
tree | c13f5ad70bdab5b6e95cefc50e4ebc170e7acabd /devstack | |
parent | 2a43e371f17e78ea749bb0d17c98df24652aeb0c (diff) | |
download | ironic-373f428fc2c6e258baa3ba7078ead96fde305d8c.tar.gz |
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
Diffstat (limited to 'devstack')
-rwxr-xr-x | devstack/files/hooks/qemu.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/devstack/files/hooks/qemu.py b/devstack/files/hooks/qemu.py index 872d5e101..75ecba9c7 100755 --- a/devstack/files/hooks/qemu.py +++ b/devstack/files/hooks/qemu.py @@ -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( - ['ip', 'link', 'show', 'type', 'macvtap'] - )).split("\n") + interfaces = subprocess.check_output( + ['ip', 'link', 'show', 'type', 'macvtap'] + ).decode().split("\n") for iface_line in interfaces: if 'macvtap' in iface_line: iface_string = iface_line.split('@') |