Skip to content
Browse files

Clean up match_hostname import

  • Loading branch information...
1 parent dd14d35 commit 0b4d034708f2107a453319c022dd8913a4186af9 @rozza rozza committed Feb 20, 2013
Showing with 5 additions and 6 deletions.
  1. +0 −5 pymongo/helpers.py
  2. +5 −1 pymongo/pool.py
View
5 pymongo/helpers.py
@@ -26,11 +26,6 @@
OperationFailure,
TimeoutError)
-try:
- from ssl import match_hostname
-except ImportError:
- from pymongo.ssl_match_hostname import match_hostname
-
def _index_list(key_or_list, direction=None):
"""Helper to generate a list of (key, direction) pairs.
View
6 pymongo/pool.py
@@ -23,7 +23,11 @@
from pymongo.common import HAS_SSL
from pymongo.errors import (CertificateError, ConnectionFailure,
ConfigurationError)
-from pymongo.helpers import match_hostname
+
+try:
+ from ssl import match_hostname
+except ImportError:
+ from pymongo.ssl_match_hostname import match_hostname
if HAS_SSL:
import ssl

0 comments on commit 0b4d034

Please sign in to comment.
Something went wrong with that request. Please try again.