From 689a9ea7555fd2feb8dfe5847716acfc77b92fe5 Mon Sep 17 00:00:00 2001 From: Kirill Sobakin Date: Mon, 16 Mar 2026 23:40:46 +0300 Subject: [PATCH] Fix: strict and sys 1 --- convert.py | 2 ++ get-subnets.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/convert.py b/convert.py index ebf51a5..90b08e9 100755 --- a/convert.py +++ b/convert.py @@ -8,6 +8,7 @@ import json import os import shutil import subprocess +import sys rusDomainsInsideOut='Russia/inside' rusDomainsInsideSrcSingle='src/Russia-domains-inside-single.lst' @@ -116,6 +117,7 @@ def compile_srs(data, name, json_dir='JSON', srs_dir='SRS'): print(f"Compiled: {srs_path}") except subprocess.CalledProcessError as e: print(f"Compile error {json_path}: {e}") + sys.exit(1) def srs_rule(name, rules): compile_srs({"version": 3, "rules": rules}, name) diff --git a/get-subnets.py b/get-subnets.py index be63fbd..d1e5186 100755 --- a/get-subnets.py +++ b/get-subnets.py @@ -57,7 +57,7 @@ def make_request(url): return req def subnet_summarization(subnet_list): - subnets = [ipaddress.ip_network(subnet) for subnet in subnet_list] + subnets = [ipaddress.ip_network(subnet, strict=False) for subnet in subnet_list] return list(ipaddress.collapse_addresses(subnets)) def fetch_asn_prefixes(asn_list):