Skip to content

Commit 4952f23

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "[Arm64][libvirt] Fix read bytes from json files"
2 parents a086a88 + 020e460 commit 4952f23

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1970,4 +1970,4 @@ def test_loaders(self):
19701970
])
19711971
mock_glob.assert_called_once_with(
19721972
'/usr/share/qemu/firmware/*.json')
1973-
mock_open.assert_called_once_with('10_fake.json')
1973+
mock_open.assert_called_once_with('10_fake.json', 'rb')

nova/virt/libvirt/host.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def _get_loaders():
108108
continue
109109

110110
for spec_path in sorted(glob.glob(f'{path}/*.json')):
111-
with open(spec_path) as fh:
111+
with open(spec_path, 'rb') as fh:
112112
spec = jsonutils.load(fh)
113113

114114
_loaders.append(spec)

0 commit comments

Comments
 (0)