spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-23522) pyspark should always use sys.exit rather than exit
Date Tue, 27 Feb 2018 03:34:00 GMT

    [ https://issues.apache.org/jira/browse/SPARK-23522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16377968#comment-16377968
] 

Apache Spark commented on SPARK-23522:
--------------------------------------

User 'benjaminp' has created a pull request for this issue:
https://github.com/apache/spark/pull/20682

> pyspark should always use sys.exit rather than exit
> ---------------------------------------------------
>
>                 Key: SPARK-23522
>                 URL: https://issues.apache.org/jira/browse/SPARK-23522
>             Project: Spark
>          Issue Type: Bug
>          Components: PySpark
>    Affects Versions: 2.2.1
>            Reporter: Benjamin Peterson
>            Priority: Major
>
> pyspark uses the builtin exit() function a lot. In certain Python environments exit is
not is not defined as a builtin. E.g.,
> {code:shell}
> $ python -c "exit(4)"
> $ python -S -c "exit(4)"
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
> NameError: name 'exit' is not defined
> {code}
> exit() as a builtin is really only intended for interactive use. Real code should always
use sys.exit.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message