bindings: (fixes #796) Gracefully exit when bindings are unavailable
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user