OFS / opae-sdk

Open Programmable Acceleration Engine
https://ofs.github.io
BSD 3-Clause "New" or "Revised" License
251 stars 84 forks source link

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

Open anandaravuri opened 6 months ago

anandaravuri commented 6 months ago

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

fpgamatt commented 6 months ago

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

coveralls commented 6 months ago

Pull Request Test Coverage Report for Build 7921225859

Details


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

💛 - Coveralls
anandaravuri commented 6 months ago

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