def list_reactors(self, tag):
        '''
        Take in the tag from an event and return a list of the reactors to
        process
        '''
        log.debug('Gathering reactors for tag %s', tag)
        reactors = []
        if isinstance(self.opts['reactor'], six.string_types):
            try:
                with salt.utils.files.fopen(self.opts['reactor']) as fp_:
                    react_map = salt.utils.yaml.safe_load(fp_)
            except (OSError, IOError):
                log.error('Failed to read reactor map: "%s"', self.opts['reactor'])
            except Exception:
                log.error('Failed to parse YAML in reactor map: "%s"', self.opts['reactor'])
        else:
            react_map = self.opts['reactor']
        for ropt in react_map:
            if not isinstance(ropt, dict):
                continue
            if len(ropt) != 1:
                continue
            key = next(six.iterkeys(ropt))
            val = ropt[key]
            if fnmatch.fnmatch(tag, key):
                if isinstance(val, six.string_types):
                    reactors.append(val)
                elif isinstance(val, list):
                    reactors.extend(val)
        return reactors
def list_reactors ( self , tag ) : log . debug ( 'Gathering reactors for tag %s' , tag ) reactors = [ ] if isinstance ( self . opts [ 'reactor' ] , six . string_types ) : try : with salt . utils . files . fopen ( self . opts [ 'reactor' ] ) as fp_ : react_map = salt . utils . yaml . safe_load ( fp_ ) except ( OSError , IOError ) : log . error ( 'Failed to read reactor map: "%s"' , self . opts [ 'reactor' ] ) except Exception : log . error ( 'Failed to parse YAML in reactor map: "%s"' , self . opts [ 'reactor' ] ) else : react_map = self . opts [ 'reactor' ] for ropt in react_map : if not isinstance ( ropt , dict ) : continue if len ( ropt ) != 1 : continue key = next ( six . iterkeys ( ropt ) ) val = ropt [ key ] if fnmatch . fnmatch ( tag , key ) : if isinstance ( val , six . string_types ) : reactors . append ( val ) elif isinstance ( val , list ) : reactors . extend ( val ) return reactors
Take in the tag from an event and return a list of the reactors to
        process