This commit is contained in:
Kovid Goyal 2016-01-09 21:47:03 +05:30
parent d7ff94d826
commit 8e503a4988

View File

@ -28,7 +28,7 @@ if iswindows:
def get_default_route_src_address():
# Use -6 for IPv6 addresses
raw = subprocess.check_output('route -4 print 0.0.0.0'.split()).decode('utf-8', 'replace')
raw = subprocess.check_output('route -4 print 0.0.0.0'.split(), creationflags=0x08).decode('utf-8', 'replace')
in_table = False
default_gateway = get_address_of_default_gateway()
for line in raw.splitlines():