mirror of
https://github.com/gSpotx2f/ruantiblock_openwrt.git
synced 2026-05-14 22:50:58 +00:00
ruantiblock-mod-py: minor fixes.
This commit is contained in:
@@ -325,8 +325,8 @@ class BlackListParser(Config):
|
|||||||
):
|
):
|
||||||
self.ip_dict[value] = subnet
|
self.ip_dict[value] = subnet
|
||||||
self.ip_subnet_dict[subnet] = (self.ip_subnet_dict.get(subnet) or 0) + 1
|
self.ip_subnet_dict[subnet] = (self.ip_subnet_dict.get(subnet) or 0) + 1
|
||||||
elif self.cidr_pattern.fullmatch(value) and value not in self.cidr_set:
|
elif self.cidr_pattern.fullmatch(value):
|
||||||
self.cidr_set.add(value)
|
self.cidr_set.add(value)
|
||||||
|
|
||||||
def _convert_to_punycode(self, string):
|
def _convert_to_punycode(self, string):
|
||||||
if self.cyr_pattern.search(string):
|
if self.cyr_pattern.search(string):
|
||||||
@@ -433,7 +433,7 @@ class Summarize:
|
|||||||
hosts = 1
|
hosts = 1
|
||||||
end = ip_obj
|
end = ip_obj
|
||||||
else:
|
else:
|
||||||
if hosts > 1 and hosts >= HOSTS_LIMIT:
|
if hosts > 1 and hosts >= cls.HOSTS_LIMIT:
|
||||||
if raw_list:
|
if raw_list:
|
||||||
remove_items(start, end)
|
remove_items(start, end)
|
||||||
yield start, end
|
yield start, end
|
||||||
|
|||||||
Reference in New Issue
Block a user