Skip to content

Commit 6473e07

Browse files
committed
Jython 2.7's ssl module is incomplete.
1 parent c0673df commit 6473e07

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pymongo/common.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515

1616
"""Functions and classes common to multiple pymongo modules."""
17+
import sys
1718
import warnings
1819
from pymongo import read_preferences
1920

@@ -28,6 +29,11 @@
2829
HAS_SSL = False
2930

3031

32+
# Jython 2.7 includes an incomplete ssl module. See PYTHON-498.
33+
if sys.platform.startswith('java'):
34+
HAS_SSL = False
35+
36+
3137
def raise_config_error(key, dummy):
3238
"""Raise ConfigurationError with the given key name."""
3339
raise ConfigurationError("Unknown option %s" % (key,))

0 commit comments

Comments
 (0)