Skip to content

Commit

Permalink
[Spark-1134] only call ipython if no arguments are given; remove IPYT…
Browse files Browse the repository at this point in the history
…HONOPTS from call

see comments on Pull Request #38
(i couldn't figure out how to modify an existing pull request, so I'm hoping I can withdraw that one and replace it with this one.)

Author: Diana Carroll <dcarroll@cloudera.com>

Closes #227 from dianacarroll/spark-1134 and squashes the following commits:

ffe47f2 [Diana Carroll] [spark-1134] remove ipythonopts from ipython command
b673bf7 [Diana Carroll] Merge branch 'master' of github.com:apache/spark
0309cf9 [Diana Carroll] SPARK-1134 bug with ipython prevents non-interactive use with spark; only call ipython if no command line arguments were supplied
  • Loading branch information
Diana Carroll authored and mateiz committed Apr 2, 2014
1 parent 764353d commit afb5ea6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/pyspark
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ if [ -n "$IPYTHON_OPTS" ]; then
IPYTHON=1
fi

if [[ "$IPYTHON" = "1" ]] ; then
exec ipython $IPYTHON_OPTS
# Only use ipython if no command line arguments were provided [SPARK-1134]
if [[ "$IPYTHON" = "1" && $# = 0 ]] ; then
exec ipython
else
exec "$PYSPARK_PYTHON" "$@"
fi

0 comments on commit afb5ea6

Please sign in to comment.