From c38fd979004539ae5901cc23c49c3354762e082b Mon Sep 17 00:00:00 2001
From: Sergey
Date: Sun, 17 May 2026 15:52:12 +0700
Subject: [PATCH] =?UTF-8?q?fix:=20=D1=84=D0=B8=D0=BB=D1=8C=D1=82=D1=80?=
=?UTF-8?q?=D0=B0=D1=86=D0=B8=D1=8F=20address-list=20=D0=B2=20Python=20?=
=?UTF-8?q?=D0=B2=D0=BC=D0=B5=D1=81=D1=82=D0=BE=20API-=D1=84=D0=B8=D0=BB?=
=?UTF-8?q?=D1=8C=D1=82=D1=80=D0=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
monitor.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/monitor.py b/monitor.py
index b81f017..b49a4e4 100644
--- a/monitor.py
+++ b/monitor.py
@@ -83,10 +83,15 @@ def fetch_address_list(api) -> list[str]:
из записей с именем ADDRESS_LIST_NAME (пропускает отключённые).
"""
resource = api.get_binary_resource("/ip/firewall/address-list")
- entries = resource.get(**{"list": ADDRESS_LIST_NAME})
+ all_entries = resource.get()
ip_list = []
- for entry in entries:
+ for entry in all_entries:
+ # Фильтруем по имени списка
+ entry_list = decode(entry.get(b"list", b""))
+ if entry_list != ADDRESS_LIST_NAME:
+ continue
+ # Пропускаем отключённые
if decode(entry.get(b"disabled", b"false")) == "true":
continue
address = decode(entry.get(b"address", b"")).strip()