def postinit(self): self._submenu_opts = deque() kernelext_dir = confighelper.get_config_helper().get( option='kern_debug_dir') image_list = list_extracted_vmlinuxes(kernelext_dir) if len(image_list) == 0: msg = _('No vmlinux images were found in %s' % (kernelext_dir)) print msg raise Exception(msg) for pkg in image_list: self._submenu_opts.append(DisplayOption(pkg, 'interactive_action'))
def postinit(self): self._submenu_opts = deque() kernelext_dir = confighelper.get_config_helper().get( option='kern_debug_dir') image_list = list_extracted_vmlinuxes(kernelext_dir) if len(image_list) == 0: msg = _('No vmlinux images were found in %s' % (kernelext_dir)) print msg raise Exception(msg) for pkg in image_list: self._submenu_opts.append(DisplayOption(pkg, 'interactive_action'))
def postinit(self): kernelext_dir = confighelper.get_config_helper().get( option='kern_debug_dir') self._submenu_opts = deque() searchopts = [] kernels = list_extracted_vmlinuxes(kernelext_dir) results = [] if common.is_interactive() and self._line == '': searchopts.append("*") else: searchopts = self._line.split() # itertools.product() would be a good option here, but not supported in # python 2.4 for kernel in kernels: for search in searchopts: if fnmatch(kernel, search): results.append(kernel) # Make the results unique, and process options for option in results: self._submenu_opts.append( DisplayOption(option, 'interactive_action'))
def postinit(self): kernelext_dir = confighelper.get_config_helper().get( option='kern_debug_dir') self._submenu_opts = deque() searchopts = [] kernels = list_extracted_vmlinuxes(kernelext_dir) results = [] if common.is_interactive() and self._line == '': searchopts.append("*") else: searchopts = self._line.split() # itertools.product() would be a good option here, but not supported in # python 2.4 for kernel in kernels: for search in searchopts: if fnmatch(kernel, search): results.append(kernel) # Make the results unique, and process options for option in results: self._submenu_opts.append(DisplayOption(option, 'interactive_action'))