Convert can.Logger and can.LogReader into functions#1703
Conversation
ae5d6dd to
daf8602
Compare
There was a problem hiding this comment.
How can a None value make its way into the dictionary? Is there a root cause that would help the user mitigate the problem?
There was a problem hiding this comment.
This was already there since the mf4-PR, but you're right, it's not necessary. I removed it.
| File will automatically recompress upon close. | ||
| """ | ||
| Logs CAN messages to a file. | ||
| real_suffix = pathlib.Path(filename).suffixes[-2].lower() |
There was a problem hiding this comment.
This will throw an IndexError if the filename does not have the necessary number of suffixes. Might be better to catch the case and raise an appropriate message.
There was a problem hiding this comment.
I added a check for the the length of suffixes
|
The front page of python-can in github gives this code in the Example usage section: so we might have a lot of people building their code on top of the idea of the |
9aea2e0 to
4727ea6
Compare

can.Loggerandcan.LogReaderinto functionslisteners.rstintonotifier.rstandfile_io.rst.