def __init__(self, list_include = None, list_exclude = None,
                 attr_regex = None, default = True):
        """Initialize Munin Attribute Filter.
        
        @param list_include: Include List (List of attributes that are enabled.)
        @param list_exclude: Exclude List (List of attributes that are disabled.)
        @param attr_regex:   If the regex is defined, the Attributes in the 
                             Include List and Exclude List are ignored unless 
                             they comply with the format dictated by the match 
                             regex.
        @param default:      Filter default. Applies when the include list is 
                             not defined and the attribute is not in the exclude 
                             list.
        
        """
        self._attrs = {}
        self._default = default
        if attr_regex:
            self._regex = re.compile(attr_regex)
        else:
            self._regex = None
        if list_include:
            self._default = False
            for attr in list_include:
                if not self._regex or self._regex.search(attr):
                    self._attrs[attr] = True
        if list_exclude:
            for attr in list_exclude:
                if not self._regex or self._regex.search(attr):
                    self._attrs[attr] = False
def __init__ ( self , list_include = None , list_exclude = None , attr_regex = None , default = True ) : self . _attrs = { } self . _default = default if attr_regex : self . _regex = re . compile ( attr_regex ) else : self . _regex = None if list_include : self . _default = False for attr in list_include : if not self . _regex or self . _regex . search ( attr ) : self . _attrs [ attr ] = True if list_exclude : for attr in list_exclude : if not self . _regex or self . _regex . search ( attr ) : self . _attrs [ attr ] = False
Initialize Munin Attribute Filter.
        
        @param list_include: Include List (List of attributes that are enabled.)
        @param list_exclude: Exclude List (List of attributes that are disabled.)
        @param attr_regex:   If the regex is defined, the Attributes in the 
                             Include List and Exclude List are ignored unless 
                             they comply with the format dictated by the match 
                             regex.
        @param default:      Filter default. Applies when the include list is 
                             not defined and the attribute is not in the exclude 
                             list.