Skip to content

Commit

Permalink
Fall back to PYSPARK_PYTHON when sys.executable is None (fixes a test)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed Jun 26, 2015
1 parent f53db55 commit 3b852ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/pyspark/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,8 @@ def do_termination_test(self, terminator):

# start daemon
daemon_path = os.path.join(os.path.dirname(__file__), "daemon.py")
daemon = Popen([sys.executable, daemon_path], stdin=PIPE, stdout=PIPE)
python_exec = sys.executable or os.environ.get("PYSPARK_PYTHON")
daemon = Popen([python_exec, daemon_path], stdin=PIPE, stdout=PIPE)

# read the port number
port = read_int(daemon.stdout)
Expand Down

0 comments on commit 3b852ae

Please sign in to comment.