Skip to content

Commit ab1e401

Browse files
efredericksonbagerard
authored andcommitted
Update connection.py
1 parent 1edae9d commit ab1e401

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mongoengine/connection.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
from pymongo import MongoClient, ReadPreference, uri_parser
44
from pymongo.common import _UUID_REPRESENTATIONS
5-
from pymongo.database_shared import _check_name
5+
try:
6+
from pymongo.database_shared import _check_name
7+
except ImportError:
8+
from pymongo.database import _check_name
69

710
# DriverInfo was added in PyMongo 3.7.
811
try:

0 commit comments

Comments
 (0)