Browse Source

Merge "[Arm64][libvirt] Fix read bytes from json files"

changes/35/782935/1
Zuul 4 months ago
committed by Gerrit Code Review
parent
commit
4952f23bbc
  1. 2
      nova/tests/unit/virt/libvirt/test_host.py
  2. 2
      nova/virt/libvirt/host.py

2
nova/tests/unit/virt/libvirt/test_host.py

@ -1970,4 +1970,4 @@ class LoadersTestCase(test.NoDBTestCase):
])
mock_glob.assert_called_once_with(
'/usr/share/qemu/firmware/*.json')
mock_open.assert_called_once_with('10_fake.json')
mock_open.assert_called_once_with('10_fake.json', 'rb')

2
nova/virt/libvirt/host.py

@ -108,7 +108,7 @@ def _get_loaders():
continue
for spec_path in sorted(glob.glob(f'{path}/*.json')):
with open(spec_path) as fh:
with open(spec_path, 'rb') as fh:
spec = jsonutils.load(fh)
_loaders.append(spec)

Loading…
Cancel
Save