mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Issue #28683: Fix the tests that bind() a unix socket and raise PermissionError
on Android for a non-root user.
This commit is contained in:
parent
1351c31aa9
commit
e88ed05006
5 changed files with 33 additions and 8 deletions
|
@ -95,7 +95,9 @@ def bind_af_aware(sock, addr):
|
|||
if HAS_UNIX_SOCKETS and sock.family == socket.AF_UNIX:
|
||||
# Make sure the path doesn't exist.
|
||||
support.unlink(addr)
|
||||
sock.bind(addr)
|
||||
support.bind_unix_socket(sock, addr)
|
||||
else:
|
||||
sock.bind(addr)
|
||||
|
||||
|
||||
class HelperFunctionTests(unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue