Skip to content

Commit d3f3d39

Browse files
committed
Resolving issue with read preference.
1 parent 55612e3 commit d3f3d39

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

flask_mongoengine/connection.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,7 @@ def _register_test_connection(port, db_alias, preserved):
233233
_conn = MongoClient('localhost', port)
234234
except errors.ConnectionFailure:
235235
continue
236-
else:
237-
break
236+
else: break
238237
else:
239238
msg = 'Cannot connect to the mongodb test instance'
240239
raise mongoengine.ConnectionError(msg)

0 commit comments

Comments
 (0)