commit 9871e066bf500ee4609675a9830f8575c8f3678b
Author: Radek Pazdera <rpazdera(a)redhat.com>
Date: Mon Oct 8 15:36:39 2012 +0200
XmlProcessing: Adding possition info to DOM root
Error reporting didn't work correctly when an error happended on
the root level of the tree.
This patch adds the position information to the root as well.
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
Common/XmlProcessing.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/Common/XmlProcessing.py b/Common/XmlProcessing.py
index 4f26958..47d3702 100644
--- a/Common/XmlProcessing.py
+++ b/Common/XmlProcessing.py
@@ -122,6 +122,8 @@ class XmlDomTreeInit:
exc.set_pos(pos)
raise exc
+ pos = {"file": self._filename, "line": 0, "col":
0}
+ dom.parse_position = pos
return dom