Skip to content

Commit 51119f0

Browse files
Marek SkalickýShaneHarvey
authored andcommitted
PYTHON-1706 Fix issues found by coverity pt. 1 (mongodb#377)
1 parent ff5f1ce commit 51119f0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pymongo/database.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ def _create_or_update_user(
10311031

10321032
opts["roles"] = [self._default_role(read_only)]
10331033

1034-
elif read_only:
1034+
if read_only:
10351035
warnings.warn("The read_only option is deprecated in MongoDB "
10361036
">= 2.6, use 'roles' instead", DeprecationWarning)
10371037

test/test_cursor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ def test_explain_with_read_concern(self):
357357
self.assertTrue(coll.find().explain())
358358
started = listener.results['started']
359359
self.assertEqual(len(started), 1)
360-
self.assertNotIn("readConern", started[0].command)
360+
self.assertNotIn("readConcern", started[0].command)
361361

362362
def test_hint(self):
363363
db = self.db

0 commit comments

Comments
 (0)