Skip to content

Commit 5e8604d

Browse files
committed
forgot to setup pre-commit for this repo
1 parent cf8bc88 commit 5e8604d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

bindings/python/pymongocrypt/synchronous/state_machine.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def collection_info(self, database, filter):
4646
- `filter`: The filter to pass to listCollections.
4747
4848
:Returns:
49-
The all or the first document from the listCollections command response as BSON.
49+
The all or first document from the listCollections command response as BSON.
5050
"""
5151

5252
@abstractmethod
@@ -125,7 +125,11 @@ def run_state_machine(ctx, callback):
125125
list_colls_filter = ctx.mongo_operation()
126126
coll_info = callback.collection_info(ctx.database, list_colls_filter)
127127
if coll_info:
128-
ctx.add_mongo_operation_result(coll_info)
128+
if isinstance(coll_info, list):
129+
for i in coll_info:
130+
ctx.add_mongo_operation_result(i)
131+
else:
132+
ctx.add_mongo_operation_result(coll_info)
129133
ctx.complete_mongo_operation()
130134
elif state == lib.MONGOCRYPT_CTX_NEED_MONGO_MARKINGS:
131135
mongocryptd_cmd = ctx.mongo_operation()

0 commit comments

Comments
 (0)