Repository: spark
Updated Branches:
  refs/heads/master 864de8eaf -> a8d2f4c5f


[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.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/a8d2f4c5
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/a8d2f4c5
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/a8d2f4c5

Branch: refs/heads/master
Commit: a8d2f4c5f92210a09c846711bd7cc89a43e2edd2
Parents: 864de8e
Author: Davies Liu <[email protected]>
Authored: Thu Aug 13 14:03:55 2015 -0700
Committer: Reynold Xin <[email protected]>
Committed: Thu Aug 13 14:03:55 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/a8d2f4c5/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]

Reply via email to