Message144434
| Author |
vstinner |
| Recipients |
amaury.forgeotdarc, giampaolo.rodola, mluis, neologix, ogait87, orsenthil, rosslagerwall, slanden, vstinner |
| Date |
2011年09月23日.00:17:38 |
| SpamBayes Score |
2.3941245e-08 |
| Marked as misclassified |
No |
| Message-id |
<1316737061.33.0.353797692488.issue10141@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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? |
|