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