diff options
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index eca29dd..4ae745c 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -2787,13 +2787,11 @@ sock_repr(PySocketSockObject *s) return NULL; } #endif - PyOS_snprintf( - buf, sizeof(buf), + return PyUnicode_FromFormat( "<socket object, fd=%ld, family=%d, type=%d, proto=%d>", (long)s->sock_fd, s->sock_family, s->sock_type, s->sock_proto); - return PyUnicode_FromString(buf); } |