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

opae.io: Fix error system exit exception value #3098

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

anandaravuri
Copy link
Contributor

@anandaravuri anandaravuri commented Feb 9, 2024

The attribute, os.EX_NOTFOUND, is not valid in pyhton. Change to a non-zero constant.

 python os exception EX_NOTFOUND doesn’t supported, change to exception code to 1

Signed-off-by: anandaravuri <[email protected]>
@anandaravuri anandaravuri requested a review from a team as a code owner February 9, 2024 21:16
@fpgamatt
Copy link
Contributor

fpgamatt commented Feb 9, 2024

How about, "The attribute, os.EX_NOTFOUND, is not valid in pyhton. Change to a non-zero constant."

@coveralls
Copy link

coveralls commented Feb 9, 2024

Pull Request Test Coverage Report for Build 7921225859

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 64.658%

Totals Coverage Status
Change from base Build 7921222968: 0.0%
Covered Lines: 15809
Relevant Lines: 24450

💛 - Coveralls

Copy link
Contributor

@pcolberg pcolberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @anandaravuri! Could you clarify the commit message to say that EX_NOTFOUND is not available on Linux? It is valid Python, but not available on all platforms.

@anandaravuri
Copy link
Contributor Author

Thanks @anandaravuri! Could you clarify the commit message to say that EX_NOTFOUND is not available on Linux? It is valid Python, but not available on all platforms.

[Ananda]
opae.io init -d 0000:38:00.1 root:root
Binding to vfio-pci will fail because IOMMU is disabled.
AttributeError: module 'os' has no attribute 'EX_NOTFOUND'

At:
/usr/lib/python3/dist-packages/opae/io/utils.py(150): vfio_init
(84): execute
(31): call
(481): main
(484):

Replaced os.EX_NOTFOUND to 1 , opae.io exits with error code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants