summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-09-12 03:34:28 -0700
committerBenjamin Peterson <benjamin@python.org>2019-09-12 11:34:28 +0100
commitf60fd95dcc189ace8c0a2177a394b9cc20389a1e (patch)
tree68804c3e33cdcfabc9a20e2e6cbc224d66338a57 /Modules
parentbpo-38008: Move builtin protocol whitelist to mapping instead of list (GH-15647) (diff)
downloadcpython-f60fd95dcc189ace8c0a2177a394b9cc20389a1e.tar.gz
cpython-f60fd95dcc189ace8c0a2177a394b9cc20389a1e.tar.bz2
cpython-f60fd95dcc189ace8c0a2177a394b9cc20389a1e.zip
closes bpo-37405: Make socket.getsockname() always return a tuple for AF_CAN. (GH-14392) (GH-16018)
This fixes a regression from 3.5. In recent releases, `getsockname()` in the AF_CAN case has returned a string. (cherry picked from commit 954900a3f98a8c0dea14dd575490237f3f8626b3) Co-authored-by: bggardner <brent@ebrent.net>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/socketmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 910e2bdd131..594a0d6efad 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -1524,7 +1524,7 @@ makesockaddr(SOCKET_T sockfd, struct sockaddr *addr, size_t addrlen, int proto)
#endif /* CAN_ISOTP */
default:
{
- return Py_BuildValue("O&", PyUnicode_DecodeFSDefault,
+ return Py_BuildValue("(O&)", PyUnicode_DecodeFSDefault,
ifname);
}
}