Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Python 3 TypeError when comparing string to None #4

Merged
merged 1 commit into from
Mar 23, 2015
Merged

Fix Python 3 TypeError when comparing string to None #4

merged 1 commit into from
Mar 23, 2015

Conversation

abbottc
Copy link

@abbottc abbottc commented Mar 18, 2015

Python 3 produces "TypeError: unorderable types" when an attempt is made to compare a string with None, and that can happen in this bit of code, since the "name" attribute can be either a string or None. This fix ensures the comparison is always between strings.

@landscape-bot
Copy link

Code Health
Repository health increased by 4% when pulling 8201f48 on abbottc:master into 537139e on landscapeio:master.

carlio added a commit that referenced this pull request Mar 23, 2015
Fix Python 3 TypeError when comparing string to None
@carlio carlio merged commit 64acb3a into landscapeio:master Mar 23, 2015
@carlio
Copy link
Member

carlio commented Mar 23, 2015

Thanks! This also fixes landscapeio/prospector#59 👍

carlio added a commit that referenced this pull request Mar 23, 2015
carlio added a commit that referenced this pull request Mar 23, 2015
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.

None yet

3 participants