[z3-checkins] r35274 - z3/deliverance/trunk/deliverance

ianb at codespeak.net ianb at codespeak.net
Mon Dec 4 22:26:55 CET 2006


Author: ianb
Date: Mon Dec  4 22:26:53 2006
New Revision: 35274

Modified:
   z3/deliverance/trunk/deliverance/utils.py
Log:
Add a warning about a libxml2 error with comments and copying

Modified: z3/deliverance/trunk/deliverance/utils.py
==============================================================================
--- z3/deliverance/trunk/deliverance/utils.py	(original)
+++ z3/deliverance/trunk/deliverance/utils.py	Mon Dec  4 22:26:53 2006
@@ -1,14 +1,22 @@
 from lxml import etree
 import re
 import urlparse
-import htmlserialize
+import copy
+from deliverance import htmlserialize
 
 # Test if the libxml2 fix is in place
 html = etree.HTML('<html><head><script>some text</script></head></html>')
 if html[0][0].text != 'some text':
     import warnings
     warnings.warn(
-        'Deliverance requires the CVS HEAD version of libxml2')
+        'Deliverance requires a newer version of libxml2 (1.1.18 or later)')
+
+# And another fix:
+html_comment = etree.Comment('test comment')
+if copy.deepcopy(html_comment) is None:
+    import warnings
+    warnings.warn(
+        'Deliverance requires a newer version of libxml2 (1.1.18 or later)')
 
 class DeliveranceError(Exception):
     """


More information about the z3-checkins mailing list