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

lspci parser PhySlot issue #554

Open
wwitzel3 opened this issue Mar 25, 2024 · 3 comments
Open

lspci parser PhySlot issue #554

wwitzel3 opened this issue Mar 25, 2024 · 3 comments
Assignees
Labels
bug Something isn't working ready-to-ship

Comments

@wwitzel3
Copy link

My system has some output from lspci that is as follows:

Slot:   38:00.0
Class:  PCI bridge [0604]
Vendor: Broadcom / LSI [1000]
Device: PEX890xx PCIe Gen 5 Switch [c030]
PhySlot:        255-2
Rev:    b0
NUMANode:       0
IOMMUGroup:     43

This PhySlot fails to parse with jc because of the attempt to cast 255-2 to an integer.

https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/lspci.py#L162

@wwitzel3
Copy link
Author

The work around for now is to use raw=True to avoid going through the step of transforming the data to the types defined in the schema.

@kellyjonbrazil
Copy link
Owner

Thank you for reporting this! I didn't realize that field would be a non-integer value. Sounds like I should just keep that a string field. (no integer conversion)

@kellyjonbrazil kellyjonbrazil self-assigned this Mar 25, 2024
@kellyjonbrazil kellyjonbrazil added the bug Something isn't working label Mar 25, 2024
@kellyjonbrazil
Copy link
Owner

kellyjonbrazil commented Apr 29, 2024

This is fixed in the dev branch. This will make it into the next release.

https://github.com/kellyjonbrazil/jc/blob/dev/jc/parsers/lspci.py

You can test by copying the parser file above into your parser plugin folder:

  • Linux/unix: $HOME/.local/share/jc/jcparsers
  • macOS: $HOME/Library/Application Support/jc/jcparsers
  • Windows: $LOCALAPPDATA\jc\jc\jcparsers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready-to-ship
Projects
None yet
Development

No branches or pull requests

2 participants