NSBperf: don't exit during import time 69/38469/1
authorRoss Brattain <ross.b.brattain@intel.com>
Mon, 31 Jul 2017 18:38:08 +0000 (11:38 -0700)
committerRoss Brattain <ross.b.brattain@intel.com>
Mon, 31 Jul 2017 18:40:05 +0000 (11:40 -0700)
This was breaking testr unittests.

Don't do this like this during import time,
only do them in if __name__ sections, otherwise
when anything else tries to import this module
it exists.

Change-Id: Ia17f5e1a5cbe07ab287d3b95e96489b8a6248170
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
yardstick/cmd/NSBperf.py

index 4e7590e..2dc0f65 100755 (executable)
@@ -30,13 +30,6 @@ from six.moves import input
 
 CLI_PATH = os.path.dirname(os.path.realpath(__file__))
 REPO_PATH = os.path.abspath(os.path.join(CLI_PATH, os.pardir))
-PYTHONPATH = os.environ.get("PYTHONPATH", False)
-VIRTUAL_ENV = os.environ.get("VIRTUAL_ENV", False)
-
-
-if not PYTHONPATH or not VIRTUAL_ENV:
-    print("Please setup env PYTHONPATH & VIRTUAL_ENV environment varaible.")
-    raise SystemExit(1)
 
 
 def sigint_handler(*args, **kwargs):