polite/configuration.py
def _type_fails(self, results):

        '''Create strings with the specific validation errors.

        Args:
            results: The results of a ConfigObj.validate call.

        Results:
            list: A list of strings containing the validation errors.

        '''

        log_lines = []

        # Iterate through the failures in the config file
        for key, value in results.iteritems():

            if issubclass(type(value), ValidateError):

                log_str = (' - Key "{}" failed with error:\n'
                           '   {}').format(key, value)
                log_lines.append(log_str)

            elif value is False:

                log_str = ' - Key "{}" must be set.'.format(key)
                log_lines.append(log_str)

            elif isinstance(value, dict):

                add_logs = self._type_fails(value)
                log_lines.extend(add_logs)

        return log_lines
Create strings with the specific validation errors.

        Args:
            results: The results of a ConfigObj.validate call.

        Results:
            list: A list of strings containing the validation errors.

        
Create strings with the specific validation errors.
Create strings with the specific validation errors .
def _type_fails(self, results):
        log_lines = []
        for key, value in results.iteritems():
            if issubclass(type(value), ValidateError):
                log_str = (' - Key "{}" failed with error:\n'
                           '   {}').format(key, value)
                log_lines.append(log_str)
            elif value is False:
                log_str = ' - Key "{}" must be set.'.format(key)
                log_lines.append(log_str)
            elif isinstance(value, dict):
                add_logs = self._type_fails(value)
                log_lines.extend(add_logs)
        return log_lines
def _type_fails ( self , results ) : log_lines = [ ] for key , value in results . iteritems ( ) : if issubclass ( type ( value ) , ValidateError ) : log_str = ( ' - Key "{}" failed with error:\n' '   {}' ) . format ( key , value ) log_lines . append ( log_str ) elif value is False : log_str = ' - Key "{}" must be set.' . format ( key ) log_lines . append ( log_str ) elif isinstance ( value , dict ) : add_logs = self . _type_fails ( value ) log_lines . extend ( add_logs ) return log_lines
Create strings with the specific validation errors.
Create strings with the specific validation errors .
'''Create strings with the specific validation errors.

        Args:
            results: The results of a ConfigObj.validate call.

        Results:
            list: A list of strings containing the validation errors.

        ''' # Iterate through the failures in the config file
self
results
The results of a ConfigObj.validate call.
The results of a ConfigObj . validate call .