Skip to content

Fix driverinfo retrieval to handle empty cases#27

Open
mworion wants to merge 1 commit into
ASCOMInitiative:masterfrom
mworion:master
Open

Fix driverinfo retrieval to handle empty cases#27
mworion wants to merge 1 commit into
ASCOMInitiative:masterfrom
mworion:master

Conversation

@mworion
Copy link
Copy Markdown

@mworion mworion commented May 26, 2026

First, many thanks for this nice package. I move completely to this solution recently in my application.

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

Copilot AI review requested due to automatic review settings May 26, 2026 07:30
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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", "") in DriverInfo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread alpaca/device.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants