Development

This commit is contained in:
Matthew Grotke 2026-06-01 23:55:56 -04:00
parent 375bf108cc
commit 09e6b7403d
3 changed files with 53 additions and 6 deletions

View file

@ -17,16 +17,16 @@ HEALTH_FILE = os.path.join(CONFIGS_DIR, '.health')
bp = Blueprint('view_page', __name__)
try:
import manuf as _manuf_mod
_mac_parser = _manuf_mod.MacParser()
from mac_vendor_lookup import MacLookup as _MacLookup
_mac_lookup = _MacLookup()
except Exception:
_mac_parser = None
_mac_lookup = None
def _get_vendor(mac):
if _mac_parser is None:
if _mac_lookup is None:
return ''
try:
return _mac_parser.get_comment(mac) or _mac_parser.get_manuf(mac) or ''
return _mac_lookup.lookup(mac) or ''
except Exception:
return ''