summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYoshitaka Aharen <aharen@jprs.co.jp>2013-02-20 08:37:59 +0100
committerYoshitaka Aharen <aharen@jprs.co.jp>2013-02-20 08:37:59 +0100
commit8131da32a67a248150d55280f94c01ce0c377272 (patch)
tree075ff22e8fb36af5f15bae61d85304a395ed220e /src
parentMerge branch 'master' into trac2157_merge (diff)
downloadkea-8131da32a67a248150d55280f94c01ce0c377272.tar.xz
kea-8131da32a67a248150d55280f94c01ce0c377272.zip
[2157] skip docbook XML test if python XML library is missing
Diffstat (limited to 'src')
-rw-r--r--src/bin/auth/tests/gen-statisticsitems_test.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/bin/auth/tests/gen-statisticsitems_test.py b/src/bin/auth/tests/gen-statisticsitems_test.py
index 256b1aeb01..0cc7bcf3d9 100644
--- a/src/bin/auth/tests/gen-statisticsitems_test.py
+++ b/src/bin/auth/tests/gen-statisticsitems_test.py
@@ -80,4 +80,11 @@ def test_xml_file(xmlfilepath):
if __name__ == "__main__":
xmlfilepath = sys.argv[1]
- test_xml_file(xmlfilepath)
+ try:
+ test_xml_file(xmlfilepath)
+ except ImportError:
+ # pyexpat library is required for ElementTree.parse() but it is
+ # missing in some environment. Just skip this test.
+ print ("Required library is missing, skipping this test.")
+ print ("Detailed information:")
+ print (sys.exc_info()[1])