(self, resultStatus, resultMsg="")
Finishes the dumper operation:
        1. Adds the session status to the xml
        2. Writes the xml to the file
        3. Closes the xml file
Finishes the dumper operation:
        1. Adds the session status to the xml
        2. Writes the xml to the file
        3. Closes the xml file
Finishes the dumper operation : 1 . Adds the session status to the xml 2 . Writes the xml to the file 3 . Closes the xml file
def finish(self, resultStatus, resultMsg=""):
        '''
        Finishes the dumper operation:
        1. Adds the session status to the xml
        2. Writes the xml to the file
        3. Closes the xml file
        '''
        if ((self._outputFP is not None) and not(self._outputFP.closed)):
            statusElem = self.__doc.createElement(STATUS_ELEM_NAME)
            statusElem.setAttributeNode(self._createAttribute(SUCESS_ATTR, getUnicode(resultStatus)))

            if not resultStatus:
                errorElem = self.__doc.createElement(ERROR_ELEM_NAME)

                if isinstance(resultMsg, Exception):
                    errorElem.setAttributeNode(self._createAttribute(TYPE_ATTR, type(resultMsg).__name__))
                else:
                    errorElem.setAttributeNode(self._createAttribute(TYPE_ATTR, UNHANDLED_PROBLEM_TYPE))

                errorElem.appendChild(self._createTextNode(getUnicode(resultMsg)))
                statusElem.appendChild(errorElem)

            self._addToRoot(statusElem)
            self.__write(prettyprint.formatXML(self.__doc, encoding=UNICODE_ENCODING))
            self._outputFP.close()
def finish ( self , resultStatus , resultMsg = "" ) : if ( ( self . _outputFP is not None ) and not ( self . _outputFP . closed ) ) : statusElem = self . __doc . createElement ( STATUS_ELEM_NAME ) statusElem . setAttributeNode ( self . _createAttribute ( SUCESS_ATTR , getUnicode ( resultStatus ) ) ) if not resultStatus : errorElem = self . __doc . createElement ( ERROR_ELEM_NAME ) if isinstance ( resultMsg , Exception ) : errorElem . setAttributeNode ( self . _createAttribute ( TYPE_ATTR , type ( resultMsg ) . __name__ ) ) else : errorElem . setAttributeNode ( self . _createAttribute ( TYPE_ATTR , UNHANDLED_PROBLEM_TYPE ) ) errorElem . appendChild ( self . _createTextNode ( getUnicode ( resultMsg ) ) ) statusElem . appendChild ( errorElem ) self . _addToRoot ( statusElem ) self . __write ( prettyprint . formatXML ( self . __doc , encoding = UNICODE_ENCODING ) ) self . _outputFP . close ( )