From 90bfa70d1bb668406f0fcdc77b410fe94b561819 Mon Sep 17 00:00:00 2001 From: Jokob-sk Date: Sat, 13 Jan 2024 08:56:05 +1100 Subject: [PATCH] =?UTF-8?q?update=5Fvendors=20work=20#533=20=F0=9F=94=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pialert/device.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pialert/device.py b/pialert/device.py index 6d1d8f62..e47cb69a 100755 --- a/pialert/device.py +++ b/pialert/device.py @@ -365,13 +365,15 @@ def query_MAC_vendor (pMAC): try: with open(vendorsPath, 'r') as f: for line in f: - if line.startswith(mac_start_string6): - mylog('debug', [f"[Vendor Check] Macth found, line to process: {line}"]) + if line.startswith(mac_start_string6): parts = line.split(' ', 1) if len(parts) > 1: vendor = parts[1].strip() mylog('debug', [f"[Vendor Check] Found '{vendor}' for '{pMAC}' in {vendorsPath}"]) 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