Added log warnings on monkey patch imports
[hooke.git] / hooke / compat / minidom.py
index b9ff34368796f1116e8178f77f6de3dfbb03f3c4..dc20ebe67c5f580749131af544fa6b2ee775e7a5 100644 (file)
@@ -1,4 +1,20 @@
-# Copyright
+# Copyright (C) 2010 W. Trevor King <wking@drexel.edu>
+#
+# This file is part of Hooke.
+#
+# Hooke is free software: you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# Hooke is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
+# Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Hooke.  If not, see
+# <http://www.gnu.org/licenses/>.
 
 """Dynamically patch :mod:`xml.dom.minidom`'s attribute value escaping.
 
@@ -11,6 +27,7 @@ Importing this module applies the suggested patch dynamically.
   http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping
 """
 
+import logging
 import xml.dom.minidom
 
 
@@ -48,3 +65,6 @@ def writexml(self, writer, indent="", addindent="", newl=""):
 instancemethod = type(xml.dom.minidom.Element.writexml)
 xml.dom.minidom.Element.writexml = instancemethod(
     writexml, None, xml.dom.minidom.Element)
+
+logging.warn(
+    'Monkey patched xml.dom.minidom.Element and ._write_data for issue5752')