bindings: (fixes #796) Gracefully exit when bindings are unavailable

This commit is contained in:
Gabriel Ferreira
2023-11-03 01:28:26 +00:00
parent 9b7088d363
commit 842871c6dc
20 changed files with 209 additions and 70 deletions

View File

@@ -51,7 +51,14 @@
# +----------------+ +----------------+
#
from ns import ns
try:
from ns import ns
except ModuleNotFoundError:
raise SystemExit(
"Error: ns3 Python module not found;"
" Python bindings may not be enabled"
" or your PYTHONPATH might not be properly configured"
)
# #
# # This function will be used below as a trace sink

View File

@@ -22,7 +22,14 @@
import sys
from ns import ns
try:
from ns import ns
except ModuleNotFoundError:
raise SystemExit(
"Error: ns3 Python module not found;"
" Python bindings may not be enabled"
" or your PYTHONPATH might not be properly configured"
)
# void
# DevTxTrace (std::string context, Ptr<const Packet> p, Mac48Address address)