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

DpkgBuilder: Using input-file does not work #9

Closed
mLuca opened this issue Dec 5, 2023 · 0 comments
Closed

DpkgBuilder: Using input-file does not work #9

mLuca opened this issue Dec 5, 2023 · 0 comments

Comments

@mLuca
Copy link

mLuca commented Dec 5, 2023

Example command:

distro2sbom --distro deb --name bullseye --release 11 --input-file myFile --sbom cyclonedx --format json

Output:

Traceback (most recent call last):
  File "/usr/local/bin/distro2sbom", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/dist-packages/distro2sbom/cli.py", line 216, in main
    sbom_build.parse_data(args["input_file"])
  File "/usr/local/lib/python3.9/dist-packages/distro2sbom/distrobuilder/dpkgbuilder.py", line 45, in parse_data
    if self.system_data.get("id") is not None:
AttributeError: 'DpkgBuilder' object has no attribute 'system_data'

Reason:

self.system_data in DpkgBuilder is only created in init if name and release were not given.

Yet, by using "--input-file" the CLI forces the user to give both name and release.

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