You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Benjamin Peterson (JIRA)" <ji...@apache.org> on 2018/02/27 03:31:00 UTC
[jira] [Created] (SPARK-23522) pyspark should always use sys.exit
rather than exit
Benjamin Peterson created SPARK-23522:
-----------------------------------------
Summary: 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
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