From e2b799b815f0e2af63246394458857903d92ff41 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Sat, 3 Nov 2012 17:47:29 -0700 Subject: [PATCH] Fix/work around setuptools' evil PYTHONPATH madness. --- bin/mn | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/mn b/bin/mn index 91cac20..142208c 100755 --- a/bin/mn +++ b/bin/mn @@ -12,10 +12,14 @@ Example to pull custom params (topo, switch, etc.) from a file: """ from optparse import OptionParser -import os.path +import os import sys import time +# Fix setuptools' evil madness, and open up (more?) security holes +if 'PYTHONPATH' in os.environ: + sys.path = os.environ[ 'PYTHONPATH' ].split( ':' ) + sys.path + from mininet.clean import cleanup from mininet.cli import CLI from mininet.log import lg, LEVELS, info