test again
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 9s
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 9s
This commit is contained in:
@@ -22,6 +22,17 @@ from pyroute2 import IPRoute
|
|||||||
try:
|
try:
|
||||||
from bcc import BPF # type: ignore
|
from bcc import BPF # type: ignore
|
||||||
except Exception as exc: # pragma: no cover - depends on host runtime
|
except Exception as exc: # pragma: no cover - depends on host runtime
|
||||||
|
dist_packages = [
|
||||||
|
Path("/usr/lib/python3/dist-packages"),
|
||||||
|
Path("/usr/lib64/python3/dist-packages"),
|
||||||
|
]
|
||||||
|
for candidate in dist_packages:
|
||||||
|
candidate_str = str(candidate)
|
||||||
|
if candidate.is_dir() and candidate_str not in sys.path:
|
||||||
|
sys.path.append(candidate_str)
|
||||||
|
try:
|
||||||
|
from bcc import BPF # type: ignore
|
||||||
|
except Exception:
|
||||||
print(f"Failed to import python3-bpfcc: {exc}", file=sys.stderr, flush=True)
|
print(f"Failed to import python3-bpfcc: {exc}", file=sys.stderr, flush=True)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user