diff options
-rw-r--r-- | nova/tests/test_libvirt.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py index 466ea62ca..c9b47437c 100644 --- a/nova/tests/test_libvirt.py +++ b/nova/tests/test_libvirt.py @@ -1912,7 +1912,9 @@ class LibvirtConnTestCase(test.TestCase): check = (lambda t: t.findall(xpath)[2].get("name"), "version") check_list.append(check) - check = (lambda t: t.findall(xpath)[2].text, + # NOTE(sirp): empty strings don't roundtrip in lxml (they are + # converted to None), so we need an `or ''` to correct for that + check = (lambda t: t.findall(xpath)[2].text or '', version.version_string_with_package()) check_list.append(check) |