Detect alternate NS3 installations (_ns3 module instead of ns3)
[nepi.git] / test / lib / test_util.py
index 87e22c3..39fe983 100644 (file)
@@ -44,7 +44,11 @@ def ns3_usable():
         found = imp.find_module('ns3')
         module = imp.load_module('ns3', *found)
     except ImportError:
-        return False
+        try:
+            found = imp.find_module('_ns3')
+            module = imp.load_module('_ns3', *found)
+        except ImportError:
+            return False
     finally:
         if ns3_bindings_path():
             del sys.path[0]