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

@@ -13,7 +13,14 @@
# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# */
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"
)
# // Default Network Topology
# //

View File

@@ -16,7 +16,14 @@
# * Ported to Python by Mohit P. Tahiliani
# */
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"
)
import sys
# // Default Network Topology

View File

@@ -16,7 +16,14 @@
# * Ported to Python by Mohit P. Tahiliani
# */
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"
)
import sys
# // Default Network Topology