summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-02-23 16:02:51 +0000
committerGerrit Code Review <review@openstack.org>2013-02-23 16:02:51 +0000
commit9f6dddb35e3a78d4408838317070a68be48218d4 (patch)
treee02f6a5e45b8a29f6bf1601dad0e05652faa9ff0
parentc389f39598e4d917a622293b02cb3f43b7799aa6 (diff)
parent2763749dec5be9c6a279cf6c5e23a89f1f98b2c0 (diff)
downloadnova-9f6dddb35e3a78d4408838317070a68be48218d4.tar.gz
nova-9f6dddb35e3a78d4408838317070a68be48218d4.tar.xz
nova-9f6dddb35e3a78d4408838317070a68be48218d4.zip
Merge "libvirt: lxml behavior breaks version check."
-rw-r--r--nova/tests/test_libvirt.py4
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)