Skip to content

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.

5 participants