def get_guideline(self, ident): device, value, footprint = parse_ident(ident) if ident in self._idents.keys(): gldict = self._idents[ident] elif device in self._devices.keys(): gldict = self._devices[device] else: gldict = self._default if gldict is None: return None if 'filter_std_vals_only' in gldict.keys() and \ gldict['filter_std_vals_only'] is True: is_std_val = check_for_std_val(ident) if not is_std_val: gldict = self._default return self._get_full_guideline(gldict, device)
def _search_vpnos(self, ident): device, value, footprint = parse_ident(ident) if device not in self._devices: return None, 'NODEVICE' try: if check_for_std_val(ident): try: return self._get_pas_vpnos(device, value, footprint) except NotImplementedError: return None, 'NOT_IMPL' if device in self._devices: return self._get_search_vpnos(device, value, footprint) else: return None, 'FILTER_NODEVICE' except (KeyboardInterrupt, SystemExit): raise except Exception: logger.error(traceback.format_exc()) logger.error('Fatal Error searching for : ' + ident) return None, None
def _search_vpnos(self, ident): device, value, footprint = parse_ident(ident) if device not in self._devices: return None, 'NODEVICE' try: if device.startswith('RES') or device.startswith('POT') or \ device.startswith('CAP') or device.startswith('CRYSTAL'): if check_for_std_val(ident) is False: return self._get_search_vpnos(device, value, footprint) try: return self._get_pas_vpnos(device, value, footprint) except NotImplementedError: return None, 'NOT_IMPL' if device in self._devices: return self._get_search_vpnos(device, value, footprint) else: return None, 'FILTER_NODEVICE' except Exception: logger.error(traceback.format_exc()) logger.error('Fatal Error searching for : ' + ident) return None, None