def find_file(self, filename, filetype = 'rulesets'):
        """

        :param filename:
        :param filetype:
        :return:
        """
        if filename and not os.path.isfile(filename):
            # Not a valid relative / absolute path, check Scout2's data under findings/ or filters/
            if not filename.startswith('findings/') and not filename.startswith('filters/'):
                filename = '%s/%s' % (filetype, filename)
            if not os.path.isfile(filename):
                filename = os.path.join(self.rules_data_path, filename)
            if not os.path.isfile(filename) and not filename.endswith('.json'):
                filename = self.find_file('%s.json' % filename, filetype)
        return filename
def find_file ( self , filename , filetype = 'rulesets' ) : if filename and not os . path . isfile ( filename ) : if not filename . startswith ( 'findings/' ) and not filename . startswith ( 'filters/' ) : filename = '%s/%s' % ( filetype , filename ) if not os . path . isfile ( filename ) : filename = os . path . join ( self . rules_data_path , filename ) if not os . path . isfile ( filename ) and not filename . endswith ( '.json' ) : filename = self . find_file ( '%s.json' % filename , filetype ) return filename
:param filename:
        :param filetype:
        :return: