Исправлена ошибка окончания записи.
This commit is contained in:
@@ -129,7 +129,7 @@ def list_ip(c_dict: dict = [], compress: bool = True):
|
|||||||
|
|
||||||
# если ключ не сжимать
|
# если ключ не сжимать
|
||||||
if ipv4_list and not compress:
|
if ipv4_list and not compress:
|
||||||
ipv4_list:str="\n".join([f"route {k} blackhole;" for k, v in ipv4_list.items() if isinstance(v, list)])
|
ipv4_list:str="".join([f"route {k} blackhole;\n" for k, v in ipv4_list.items() if isinstance(v, list)])
|
||||||
# сжимаем подсети ipv4
|
# сжимаем подсети ipv4
|
||||||
elif ipv4_list and compress:
|
elif ipv4_list and compress:
|
||||||
# строим дерево
|
# строим дерево
|
||||||
@@ -150,7 +150,7 @@ def list_ip(c_dict: dict = [], compress: bool = True):
|
|||||||
|
|
||||||
# если ключ не сжимать
|
# если ключ не сжимать
|
||||||
if ipv6_list and not compress:
|
if ipv6_list and not compress:
|
||||||
ipv6_list:str="\n".join([f"route {k} blackhole;" for k, v in ipv6_list.items() if isinstance(v, list)])
|
ipv6_list:str="".join([f"route {k} blackhole;\n" for k, v in ipv6_list.items() if isinstance(v, list)])
|
||||||
# сжимаем подсети ipv6
|
# сжимаем подсети ipv6
|
||||||
if ipv6_list and compress:
|
if ipv6_list and compress:
|
||||||
None
|
None
|
||||||
|
|||||||
Reference in New Issue
Block a user