Aquacomputer driver enhancements#489
Conversation
|
As far as I can see I didn't change anything that would upset the keyval test... |
I think we just experienced a corruption of the Python interpreter. The assertion failure, if I read it correctly, was caused by in that specific run a method call assert store.load(...) == 2somehow becoming a method reference, turning the assertion in memory to something like assert store.load == 2which obviously is false. Anyway, I restarted the job and then it completed fine. |
|
|
||
| fw = self.firmware_version | ||
| serial_number = self.serial_number | ||
| serial_number = self._serial_number |
There was a problem hiding this comment.
Shouldn't this be self._serial? And how isn't this tripping the tests?
Also, needing two reads in the normal path (which is to call initialize first) isn't ideal, even if the interval between reports is fairly short.
I think it would be better if the properties used a shared _read_device_statics (or something like it) method to parses both fields from a single _read.
There was a problem hiding this comment.
self._serial is where the serial number gets stored from within the self._serial_number property (currently), it would be empty on its own.
|
Thanks! |
For
aquacomputer.py, make serial number property private and read that and firmware version only when they are requested, but not already cached.Related: #482
Checklist:
liquidctl.8Linux/Unix/Mac OS man pagedocs/*guide.mddevice guidesNew CLI flag?
extra/completions/New device?
extra/linux/71-liquidctl.rules(instructions in the file header)en)New driver?
docs/developer/protocol/