Minor adjustments

This commit is contained in:
Bernardo Damele 2010-06-10 15:34:28 +00:00
parent 35642a0450
commit 75dc44deb8
2 changed files with 7 additions and 7 deletions

View File

@ -513,12 +513,12 @@ class XMLDump:
statusElem = self.__doc.createElement(STATUS_ELEM_NAME)
statusElem.setAttributeNode(self.__createAttribute(SUCESS_ATTR,getUnicode(resultStatus)))
if not(resultStatus) :
if not resultStatus:
errorElem = self.__doc.createElement(ERROR_ELEM_NAME)
if (isinstance(resultMsg, Exception)):
if isinstance(resultMsg, Exception):
errorElem.setAttributeNode(self.__createAttribute(TYPE_ATTR, type(resultMsg).__name__))
else :
else:
errorElem.setAttributeNode(self.__createAttribute(TYPE_ATTR, UNHANDLED_PROBLEM_TYPE))
errorElem.appendChild(self.__createTextNode(getUnicode(resultMsg)))

View File

@ -92,17 +92,17 @@ def main():
logger.error(e)
closeDumper(False, e)
except KeyboardInterrupt, e:
except KeyboardInterrupt, _:
print
errMsg = "user aborted"
logger.error(errMsg)
closeDumper(False, e)
closeDumper(False, errMsg)
except EOFError, e:
except EOFError, _:
print
errMsg = "exit"
logger.error(errMsg)
closeDumper(False, e)
closeDumper(False, errMsg)
except:
print