You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ma...@apache.org on 2014/04/02 04:29:33 UTC
git commit: [Spark-1134] only call ipython if no arguments are given;
remove IPYTHONOPTS from call
Repository: spark
Updated Branches:
refs/heads/master 764353d2c -> afb5ea627
[Spark-1134] only call ipython if no arguments are given; remove IPYTHONOPTS from call
see comments on Pull Request https://github.com/apache/spark/pull/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 <dc...@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
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/afb5ea62
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/afb5ea62
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/afb5ea62
Branch: refs/heads/master
Commit: afb5ea62786e3ca055e247176def3e7ecf0d2c9d
Parents: 764353d
Author: Diana Carroll <dc...@cloudera.com>
Authored: Tue Apr 1 19:29:26 2014 -0700
Committer: Matei Zaharia <ma...@databricks.com>
Committed: Tue Apr 1 19:29:26 2014 -0700
----------------------------------------------------------------------
bin/pyspark | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/afb5ea62/bin/pyspark
----------------------------------------------------------------------
diff --git a/bin/pyspark b/bin/pyspark
index 67e1f61..7932a24 100755
--- a/bin/pyspark
+++ b/bin/pyspark
@@ -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