mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-05-02 00:53:01 +00:00
Native string all the things.
This commit is contained in:
parent
74fe9ccf56
commit
d8bf811b92
@ -102,7 +102,7 @@ except ImportError:
|
|||||||
increase_rlimits = _increase_rlimits
|
increase_rlimits = _increase_rlimits
|
||||||
|
|
||||||
def get_local_addresses_sync():
|
def get_local_addresses_sync():
|
||||||
return _synchronously_find_addresses_via_config()
|
return [native_str(a) for a in _synchronously_find_addresses_via_config()]
|
||||||
|
|
||||||
def get_local_addresses_async(target="198.41.0.4"): # A.ROOT-SERVERS.NET
|
def get_local_addresses_async(target="198.41.0.4"): # A.ROOT-SERVERS.NET
|
||||||
"""
|
"""
|
||||||
@ -131,7 +131,7 @@ def get_local_addresses_async(target="198.41.0.4"): # A.ROOT-SERVERS.NET
|
|||||||
addresses.append(addr)
|
addresses.append(addr)
|
||||||
return addresses
|
return addresses
|
||||||
d.addCallback(_collect)
|
d.addCallback(_collect)
|
||||||
|
d.addCallback(lambda addresses: [native_str(s) for s in addresses])
|
||||||
return d
|
return d
|
||||||
|
|
||||||
def get_local_ip_for(target):
|
def get_local_ip_for(target):
|
||||||
@ -176,7 +176,7 @@ def get_local_ip_for(target):
|
|||||||
except (socket.error, CannotListenError):
|
except (socket.error, CannotListenError):
|
||||||
# no route to that host
|
# no route to that host
|
||||||
localip = None
|
localip = None
|
||||||
return localip
|
return native_str(localip)
|
||||||
|
|
||||||
|
|
||||||
# Wow, I'm really amazed at home much mileage we've gotten out of calling
|
# Wow, I'm really amazed at home much mileage we've gotten out of calling
|
||||||
|
Loading…
x
Reference in New Issue
Block a user