Skip to content

Commit 6019a1e

Browse files
committed
Fix typing
1 parent 05ede54 commit 6019a1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymongo/topology_description.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ def apply_selector(
322322
if address:
323323
# Ignore selectors when explicit address is requested.
324324
description = self.server_descriptions().get(address)
325-
return [description] if description.is_server_type_known else []
325+
return [description] if description and description.is_server_type_known else []
326326

327327
# Primary selection fast path.
328328
if self.topology_type == TOPOLOGY_TYPE.ReplicaSetWithPrimary and type(selector) is Primary:

0 commit comments

Comments
 (0)