Robustness for application/imagebytes and driverinfo retrieval to handle empty cases - #27
Robustness for application/imagebytes and driverinfo retrieval to handle empty cases#27mworion wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates DriverInfo to provide a default value when the driverinfo field is missing, avoiding errors from calling .split() on None.
Changes:
- Adds a default empty-string fallback to
self._get("driverinfo", "")inDriverInfo.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hi, is there any chance to review my proposal ? This would lower unnecessary error logging in my app. |
|
Adding the camera application/imagebytes fix |
|
As a result of our conversation on ASCOM Developer Help, I had already made the changes to Thank you for this |
First, many thanks for this nice package. I move completely to this solution recently in my application.
aded the imagebytes topic as well…
I interface with NINA (as they offer all devices as ALPACA devices through a plugin).
In case of some devices they are not filling the device.info field. The conformance checker does not raise an issue about it.
If there is no field populated, get will return NONE. From implementation this could happen.
If doing a split to none, python raises an exception. This could be corrected by giving a default value of an empty string.
If an empty device.info is right or incorrect I do not address, simply only the robustness of the python implementation.
Michel