Изменение эндпоинта
This commit is contained in:
parent
d66ca147e4
commit
8ddd5d42c9
2 changed files with 2 additions and 3 deletions
|
|
@ -171,8 +171,7 @@ class SubnetService:
|
|||
def _get_default_interface(self) -> str:
|
||||
try:
|
||||
gateways = netifaces.gateways()
|
||||
default_gateway = gateways.get("default",
|
||||
{}).get(netifaces.AF_INET)
|
||||
default_gateway = gateways.get("default",{}).get(netifaces.AF_INET)
|
||||
if default_gateway:
|
||||
return default_gateway[1]
|
||||
interfaces = netifaces.interfaces()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue