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

added exception for KeyError #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

omicronn88
Copy link

Hello!

Apparently this module breaks when there're docker volumes present. On one of my hosts I get the following error:

Traceback (most recent call last):
File "./dpinventory-agent.py", line 89, in
blkd = BlkDiskInfo()
File "/usr/local/lib/python3.6/site-packages/blkinfo/wrappers.py", line 58, in init
self._disks = LsBlkWrapper._build_disk_tree()
File "/usr/local/lib/python3.6/site-packages/blkinfo/wrappers.py", line 156, in _build_disk_tree
disk_tree[p[0]]['children'].append(disk_tree[name])
KeyError: 'docker-253:4-50749888-ce14c7ed98ed9fa04f3c82e7a22255eae1c606620e805b6612c00e7ae879'

I don't think docker volumes can be regarded as actual blk devices so simply skipping them seems reasonable to me.

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.

1 participant