style: rename ip6 addresses variable
continuous-integration/drone/push Build is failing Details

pull/99/head
Inex Code 2024-03-01 15:06:32 +03:00
parent bbec9d9d33
commit 5616dbe77a
1 changed files with 3 additions and 3 deletions

View File

@ -21,11 +21,11 @@ def get_ip4() -> str:
def get_ip6() -> Optional[str]:
"""Get IPv6 address"""
try:
ip6 = subprocess.check_output(["ip", "addr", "show", "dev", "eth0"]).decode(
ip6_addresses = subprocess.check_output(["ip", "addr", "show", "dev", "eth0"]).decode(
"utf-8"
)
ip6 = re.findall(r"inet6 (\S+)\/\d+", ip6)
for address in ip6:
ip6_addresses = re.findall(r"inet6 (\S+)\/\d+", ip6_addresses)
for address in ip6_addresses:
if ipaddress.IPv6Address(address).is_global:
return address
except subprocess.CalledProcessError: