update_vendors work #533 🔃

This commit is contained in:
Jokob-sk
2024-01-13 08:56:05 +11:00
parent 7561a8478d
commit 90bfa70d1b

View File

@@ -365,13 +365,15 @@ def query_MAC_vendor (pMAC):
try: try:
with open(vendorsPath, 'r') as f: with open(vendorsPath, 'r') as f:
for line in f: for line in f:
if line.startswith(mac_start_string6): if line.startswith(mac_start_string6):
mylog('debug', [f"[Vendor Check] Macth found, line to process: {line}"])
parts = line.split(' ', 1) parts = line.split(' ', 1)
if len(parts) > 1: if len(parts) > 1:
vendor = parts[1].strip() vendor = parts[1].strip()
mylog('debug', [f"[Vendor Check] Found '{vendor}' for '{pMAC}' in {vendorsPath}"]) mylog('debug', [f"[Vendor Check] Found '{vendor}' for '{pMAC}' in {vendorsPath}"])
return vendor return vendor
else:
mylog('debug', [f'[Vendor Check] ⚠ ERROR: Match found, but line could not be processed: "{line}"'])
return -1
return -1 # MAC address not found in the database return -1 # MAC address not found in the database