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

Running without --name and --release throws IndexError: list index out of range #8

Closed
aristotelos opened this issue Oct 31, 2023 · 1 comment

Comments

@aristotelos
Copy link

Running with --package but without --name and --release throws an error IndexError: list index out of range.

(test-env) [user@my ~]$ distro2sbom --distro rpm --package xyz--output-file xyz-rpm.cdx.json
Traceback (most recent call last):
  File "/home/ansible/test-env/bin/distro2sbom", line 8, in <module>
    sys.exit(main())
  File "/home/ansible/test-env/lib64/python3.9/site-packages/distro2sbom/cli.py", line 206, in main
    sbom_build = RpmBuilder(args["name"], args["release"], args["debug"])
  File "/home/ansible/test-env/lib64/python3.9/site-packages/distro2sbom/distrobuilder/rpmbuilder.py", line 22, in __init__
    self.system_data = self.get_system()
  File "/home/ansible/test-env/lib64/python3.9/site-packages/distro2sbom/distrobuilder/distrobuilder.py", line 81, in get_system
    metadata[data[0].lower()] = data[1].replace('"', "").strip()
IndexError: list index out of range

It seems adding --name xyz --release xyz fixes the command, but it does not add much additional information to the SBOM.

@anthonyharrison
Copy link
Owner

Fixed in release 0.4.1

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

No branches or pull requests

2 participants