Skip to content

Fix issues found by coverity - #377

Closed
omron93 wants to merge 1 commit into
mongodb:masterfrom
omron93:master
Closed

omron93 wants to merge 1 commit into
mongodb:masterfrom
omron93:master

Conversation

@omron93

@omron93 omron93 commented Oct 1, 2018

Copy link
Copy Markdown

I've run coverity scan of python-pymongo 3.6.1 - see log scan-results.txt

I've guessed what is the right way to fix the issues which IMHO aren't false positive. In case of other preferences, I will change it.

pymongo/database.py - without this fix, elif is never reached.
mongo_client.py - session can be None, so it needs to be checked.
test_cursor.py - typo
utils.py - currently `pref.tag_sets" is never used. Using tags from both lists.

@behackett

Copy link
Copy Markdown
Member

That's interesting. We run coverity also, but don't get any output related to pure Python, only the C extensions. Thanks for this. We'll take a deeper look soon.

@ShaneHarvey

Copy link
Copy Markdown
Contributor

Merged thanks @omron93!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants