Skip to content

Commit

Permalink
[FIX] is_interface_up
Browse files Browse the repository at this point in the history
  • Loading branch information
etobella committed Nov 15, 2019
1 parent 3c25c0c commit 36d3729
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion oot/server/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@


def is_interface_up(interface):
addr = netifaces.ifaddresses(interface)
try:
addr = netifaces.ifaddresses(interface)
except ValueError:
return False
return addr.get(netifaces.AF_INET, False)

0 comments on commit 36d3729

Please sign in to comment.