Skip to content

Commit

Permalink
scripts/vm-util: Fix fstrings for Python < 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
avdgrinten committed Nov 23, 2024
1 parent a635d63 commit 5bb9541
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/vm-util.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ def parse_device(yml, *, bus_id=None, device_id=None):

if devtype == 'pci-bridge':
qemu_pci_bridges += 1
args += ['-device', f'pci-bridge,id={yml['name']},chassis_nr={qemu_pci_bridges}']
args += ['-device', f"pci-bridge,id={yml['name']},chassis_nr={qemu_pci_bridges}"]

for i, device in enumerate(yml.get('devices', [])):
args += parse_device(device, bus_id=yml['name'], device_id=i)
elif devtype == 'pci-multifunction-device':
multifunction_property_set = False

for i, func in enumerate(yml.get('functions', [])):
properties = f'vfio-pci,host={func['host']}'
properties = f"vfio-pci,host={func['host']}"
if bus_id:
properties += f',bus={bus_id}'
if i == 0:
Expand All @@ -115,7 +115,7 @@ def parse_device(yml, *, bus_id=None, device_id=None):
properties += f',addr={device_id:02x}.{i}'
args += ['-device', properties]
elif devtype == 'pci-device':
args += ['-device', f'vfio-pci,host={yml['host']},id={yml['name']}']
args += ['-device', f"vfio-pci,host={yml['host']},id={yml['name']}"]
else:
print(f"error: unsupported device-spec device kind {devtype}")
sys.exit(1)
Expand Down

0 comments on commit 5bb9541

Please sign in to comment.