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

Valide "hdd" element is in storage_info list #87

Merged
merged 3 commits into from
Jul 29, 2023

Conversation

weitzelb
Copy link
Contributor

@weitzelb weitzelb commented Jul 5, 2023

Adressing issue #85

storage_info does not contain any "hdd" element if the camera has no storage.

2023-07-05 19:41:41.925 DEBUG (MainThread) [custom_components.hikvision_next.isapi] http://hof.mine.de/ISAPI/ContentMgmt/Storage [{'@Version': '1.0', '@xmlns': 'http://www.hikvision.com/ver10/XMLSchema', '@SiZe': '8'}]

Added a check to prevent the for loop executing, preventing calling storage.get("hdd") which is going to cause an exception. Instead directly return an empty hdd list.

storage_info does not contain any "hdd" element if the camera has none. Added a check to prevent the storage.get("hdd") which is going to cause an exception and return an empty storage list.
@Loic691
Copy link

Loic691 commented Jul 26, 2023

Hi
A I have the same issus
When this PR will be pushed ?
It will ok if I changed manualy the check...

@maciej-or maciej-or merged commit e24f411 into maciej-or:main Jul 29, 2023
2 checks 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.

3 participants