STINNER Victor <victor.stin...@haypocalc.com> added the comment: socketcan_v4.patch: - dummy question: why an address is a tuple with 1 string instead of just the string? Does AF_UNIX also uses a tuple of 1 string? - the example should also use struct.pack() to create the frame, I don't like hardcoded BLOB - in test_socket: _have_socket_can() interprets permission denied as "CAN is not supported", it would be nice to provide a better skip message. Create maybe a decorator based? - _have_socket_can(): you may move s.close() outside the try block (add maybe a "else:" block?) because you may hide a real bug in .close() - data += b'\0' * (8 - can_dlc): I prefer data = data.ljust(8, '\x00') - you might add frame encoder/decoder in your example - if (!strcmp(PyBytes_AS_STRING(interfaceName), "")) hum..... PyBytes_GET_SIZE(intername)==0 should be enough - you truncate the interface name, it can be surprising, I would prefer an error (e.g. "interface name too long: 20 characters, the maximum is 10 characters" ?) - (oh no! don't include horrible configure diff in patches for the bug tracker :-p)
In which Linux version was CAN introduced? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10141> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com