[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py
Charalampos Stratakis
report at bugs.python.org
Tue Oct 23 11:30:54 EDT 2018
New submission from Charalampos Stratakis <cstratak at redhat.com>:
Analyzing some coverity scan results I stumbled upon this issue:
Python-3.6.5/Lib/xml/dom/minidom.py:1914: original: "n._call_user_data_handler(operation, n, notation)" looks like the original copy.
Python-3.6.5/Lib/xml/dom/minidom.py:1924: copy_paste_error: "n" in "e._call_user_data_handler(operation, n, entity)" looks like a copy-paste error.
Python-3.6.5/Lib/xml/dom/minidom.py:1924: remediation: Should it say "e" instead?
# 1922| clone.entities._seq.append(entity)
# 1923| if hasattr(e, '_call_user_data_handler'):
# 1924|-> e._call_user_data_handler(operation, n, entity)
# 1925| else:
# 1926| # Note the cloning of Document and DocumentType nodes is
It seems that the warning is indeed a bug, and the code in question was basically merged into python from pyxml 16 years ago.
----------
components: Library (Lib)
messages: 328321
nosy: cstratak
priority: normal
severity: normal
status: open
title: Coverity scan: copy/paste error in Lib/xml/dom/minidom.py
versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35052>
_______________________________________
More information about the Python-bugs-list
mailing list