def __init__(self, settings=None):
        """
        Initialize object

        :param settings: Settings for instance (default: None)
        :type settings: dict | None
        :rtype: None
        :raises IOError: Failed to load settings file
        """
        if settings is None:
            settings = {}
        super(Loadable, self).__init__(settings)
        sett_path = settings.get('settings_file', None)
        self._pre_path = settings.get('path_prefix', None)

        if sett_path:
            sett_path = self.join_path_prefix(sett_path)
            sett = self.load_settings(sett_path)
            sett_prepath = sett.get('path_prefix')
            if sett_prepath:
                # if sett_path is absolute path
                # -> set to sett_path else join with dict path_prefix
                self._pre_path = self.join_path_prefix(sett_prepath)
            # settings in constructor overwrite settings from file
            sett.update(settings)
            settings.update(sett)
            self.debug("Loaded config {}".format(sett_path))
            # to apply loaded settings to logable as well
            super(Loadable, self).__init__(settings)
def __init__ ( self , settings = None ) : if settings is None : settings = { } super ( Loadable , self ) . __init__ ( settings ) sett_path = settings . get ( 'settings_file' , None ) self . _pre_path = settings . get ( 'path_prefix' , None ) if sett_path : sett_path = self . join_path_prefix ( sett_path ) sett = self . load_settings ( sett_path ) sett_prepath = sett . get ( 'path_prefix' ) if sett_prepath : self . _pre_path = self . join_path_prefix ( sett_prepath ) sett . update ( settings ) settings . update ( sett ) self . debug ( "Loaded config {}" . format ( sett_path ) ) super ( Loadable , self ) . __init__ ( settings )
Initialize object

        :param settings: Settings for instance (default: None)
        :type settings: dict | None
        :rtype: None
        :raises IOError: Failed to load settings file