Fix determining if IPv6 is supported when it's disabled
On systems where IPv6 is completly disabled there can be AttributeError when shade tries to determine if IPv6 is supported or not on local system. Now it's fixed by returning False always when AF_INET6 isn't available in netifaces. Change-Id: I45138bd42cb63ff59b6aed85f33da11aab43aaba Related-Bug: #2001001
This commit is contained in:
parent
b92697b1a3
commit
89e07d905a
@ -259,7 +259,10 @@ def localhost_supports_ipv6():
|
||||
IPv6 connectivity.
|
||||
"""
|
||||
|
||||
return netifaces.AF_INET6 in netifaces.gateways()['default']
|
||||
try:
|
||||
return netifaces.AF_INET6 in netifaces.gateways()['default']
|
||||
except AttributeError:
|
||||
return False
|
||||
|
||||
|
||||
def normalize_users(users):
|
||||
|
Loading…
x
Reference in New Issue
Block a user