aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/shell.py
diff options
context:
space:
mode:
authorKen Takagiwa <ken@Kens-MacBook-Pro.local>2014-07-15 21:34:05 -0700
committerReynold Xin <rxin@apache.org>2014-07-15 21:34:05 -0700
commit563acf5edfbfb2fa756a1f0accde0940592663e9 (patch)
treee4df0fc75b2c1aa748e80293dd099b5eb6ea375b /python/pyspark/shell.py
parent9c12de5092312319aa22f24df47a6de0e41a0102 (diff)
downloadspark-563acf5edfbfb2fa756a1f0accde0940592663e9.tar.gz
spark-563acf5edfbfb2fa756a1f0accde0940592663e9.tar.bz2
spark-563acf5edfbfb2fa756a1f0accde0940592663e9.zip
follow pep8 None should be compared using is or is not
http://legacy.python.org/dev/peps/pep-0008/ ## Programming Recommendations - Comparisons to singletons like None should always be done with is or is not, never the equality operators. Author: Ken Takagiwa <ken@Kens-MacBook-Pro.local> Closes #1422 from giwa/apache_master and squashes the following commits: 7b361f3 [Ken Takagiwa] follow pep8 None should be checked using is or is not
Diffstat (limited to 'python/pyspark/shell.py')
-rw-r--r--python/pyspark/shell.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/pyspark/shell.py b/python/pyspark/shell.py
index ebd714db7a..2ce5409cd6 100644
--- a/python/pyspark/shell.py
+++ b/python/pyspark/shell.py
@@ -35,7 +35,7 @@ from pyspark.context import SparkContext
from pyspark.storagelevel import StorageLevel
# this is the equivalent of ADD_JARS
-add_files = os.environ.get("ADD_FILES").split(',') if os.environ.get("ADD_FILES") != None else None
+add_files = os.environ.get("ADD_FILES").split(',') if os.environ.get("ADD_FILES") is not None else None
if os.environ.get("SPARK_EXECUTOR_URI"):
SparkContext.setSystemProperty("spark.executor.uri", os.environ["SPARK_EXECUTOR_URI"])
@@ -55,7 +55,7 @@ print("Using Python version %s (%s, %s)" % (
platform.python_build()[1]))
print("SparkContext available as sc.")
-if add_files != None:
+if add_files is not None:
print("Adding files: [%s]" % ", ".join(add_files))
# The ./bin/pyspark script stores the old PYTHONSTARTUP value in OLD_PYTHONSTARTUP,