Skip to content

Commit

Permalink
netifaces.gateways() crashes on OSX!?
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@12391 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 16, 2016
1 parent 7b180c4 commit 705ad5f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/xpra/net/net_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ def get_interfaces():
def get_gateways():
if not has_netifaces:
return {}
#no idea why, but this causes crashes on OSX:
if sys.platform.startswith("darwin"):
return {}
try:
d = netifaces.gateways()
AF_NAMES = {}
Expand All @@ -48,6 +51,7 @@ def get_gateways():
gateways[AF_NAMES.get(family, family)] = gws
return gateways
except:
log("get_gateways() failed", exc_info=True)
return {}

def get_bind_IPs():
Expand Down

0 comments on commit 705ad5f

Please sign in to comment.