'If an error is present, then log it.'

def CheckError(self):

    if self.error:
        logger.error('Error    in    %s:    %s', self.GetFriendlyName(), self.error)
        if self.traceback:
            logger.debug(''.join(traceback.format_exception(self.error.__class__, self.error, self.traceback)))
