def __init__(self, config_files):
        '''
        Creates a new config object.

        Parameters:
        config_files: Dictionary with file_name: is_production setting
        '''
        for config_file, is_production in config_files:
            if os.path.isfile(config_file):
                self.config_file = config_file
                self.is_production = is_production
                self.config = configparser.SafeConfigParser()
                self.config.read([self.config_file], encoding='utf-8')
                return

        raise IOError("No configuration file found.")
def __init__ ( self , config_files ) : for config_file , is_production in config_files : if os . path . isfile ( config_file ) : self . config_file = config_file self . is_production = is_production self . config = configparser . SafeConfigParser ( ) self . config . read ( [ self . config_file ] , encoding = 'utf-8' ) return raise IOError ( "No configuration file found." )
Creates a new config object.

        Parameters:
        config_files: Dictionary with file_name: is_production setting