Repository: spark Updated Branches: refs/heads/branch-1.5 875ecc7f6 -> 2c7f8da58
[SPARK-9942] [PYSPARK] [SQL] ignore exceptions while try to import pandas If pandas is broken (can't be imported, raise other exceptions other than ImportError), pyspark can't be imported, we should ignore all the exceptions. Author: Davies Liu <[email protected]> Closes #8173 from davies/fix_pandas. (cherry picked from commit a8d2f4c5f92210a09c846711bd7cc89a43e2edd2) Signed-off-by: Reynold Xin <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/2c7f8da5 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/2c7f8da5 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/2c7f8da5 Branch: refs/heads/branch-1.5 Commit: 2c7f8da58085f5badf765c92cd5de8d91307e858 Parents: 875ecc7 Author: Davies Liu <[email protected]> Authored: Thu Aug 13 14:03:55 2015 -0700 Committer: Reynold Xin <[email protected]> Committed: Thu Aug 13 14:04:01 2015 -0700 ---------------------------------------------------------------------- python/pyspark/sql/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/2c7f8da5/python/pyspark/sql/context.py ---------------------------------------------------------------------- diff --git a/python/pyspark/sql/context.py b/python/pyspark/sql/context.py index 917de24..0ef46c4 100644 --- a/python/pyspark/sql/context.py +++ b/python/pyspark/sql/context.py @@ -39,7 +39,7 @@ from pyspark.sql.functions import UserDefinedFunction try: import pandas has_pandas = True -except ImportError: +except Exception: has_pandas = False __all__ = ["SQLContext", "HiveContext", "UDFRegistration"] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
