# HG changeset patch # User Paul Boddie # Date 1219963823 -7200 # Node ID 639a06cd1da8ebbc412885a3eaab4d877725e63c # Parent 92d6d68675cbbf5cda3c2a294bb97b88ebd042f2 Reset the specific error. There may still be a race condition in obtaining the error, however. diff -r 92d6d68675cb -r 639a06cd1da8 libxml2dom/macrolib/macrolib.py --- a/libxml2dom/macrolib/macrolib.py Fri Aug 29 00:44:46 2008 +0200 +++ b/libxml2dom/macrolib/macrolib.py Fri Aug 29 00:50:23 2008 +0200 @@ -636,7 +636,7 @@ return doc finally: - Parser_resetError() + Parser_resetError(error) def toString(node, encoding=None, prettyprint=0): return libxml2mod.serializeNode(node, encoding, prettyprint) @@ -699,8 +699,11 @@ def Parser_error(): return libxml2mod.xmlGetLastError() -def Parser_resetError(): - return libxml2mod.xmlResetLastError() +def Parser_resetError(error): + if error is None: + return libxml2mod.xmlResetLastError() + else: + return libxml2mod.xmlResetError(error) def Parser_errorLevel(error): return libxml2mod.xmlErrorGetLevel(error)