1.1 --- a/libxml2dom/macrolib/macrolib.py Fri Aug 29 00:44:46 2008 +0200
1.2 +++ b/libxml2dom/macrolib/macrolib.py Fri Aug 29 00:50:23 2008 +0200
1.3 @@ -636,7 +636,7 @@
1.4 return doc
1.5
1.6 finally:
1.7 - Parser_resetError()
1.8 + Parser_resetError(error)
1.9
1.10 def toString(node, encoding=None, prettyprint=0):
1.11 return libxml2mod.serializeNode(node, encoding, prettyprint)
1.12 @@ -699,8 +699,11 @@
1.13 def Parser_error():
1.14 return libxml2mod.xmlGetLastError()
1.15
1.16 -def Parser_resetError():
1.17 - return libxml2mod.xmlResetLastError()
1.18 +def Parser_resetError(error):
1.19 + if error is None:
1.20 + return libxml2mod.xmlResetLastError()
1.21 + else:
1.22 + return libxml2mod.xmlResetError(error)
1.23
1.24 def Parser_errorLevel(error):
1.25 return libxml2mod.xmlErrorGetLevel(error)