Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if data exist in features #7

Merged
merged 1 commit into from
Jan 20, 2024
Merged

Check if data exist in features #7

merged 1 commit into from
Jan 20, 2024

Conversation

Kali-
Copy link
Contributor

@Kali- Kali- commented Jan 19, 2024

should prevent crash when no data is returned

2024/01/17 09:17:00 | stderr | KeyError: 'data'
2024/01/17 09:17:00 | stderr | ~~~~~~~~^^^^^^^^
2024/01/17 09:17:00 | stderr | for feature in features["data"]:
2024/01/17 09:17:00 | stderr | File "/vicare_exporter/metrics.py", line 135, in _fetch_devices_features

vicare_exporter/metrics.py Outdated Show resolved Hide resolved
Copy link
Owner

@sebbegg sebbegg left a comment

Choose a reason for hiding this comment

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

thanks 👍

@sebbegg sebbegg merged commit 0236e16 into sebbegg:main Jan 20, 2024
1 check passed
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