Code should use 'is not None' instead of '!= None'

Bug #1010570 reported by Johannes Erdfelt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-common
Fix Released
Undecided
Johannes Erdfelt

Bug Description

pep8 complains that some code should use 'is not None' instead of '!= None':

openstack/common/cfg.py:525:28: E711 comparison to None should be 'if cond is not None:'
        if deprecated_name != None:
                           ^
openstack/common/cfg.py:544:33: E711 comparison to None should be 'if cond is not None:'
        if self.deprecated_name != None:
                                ^
openstack/common/cfg.py:758:33: E711 comparison to None should be 'if cond is not None:'
        if self.deprecated_name != None:
                                ^

Changed in openstack-common:
assignee: nobody → Johannes Erdfelt (johannes.erdfelt)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-common (master)

Fix proposed to branch: master
Review: https://review.openstack.org/8345

Changed in openstack-common:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-common (master)

Reviewed: https://review.openstack.org/8345
Committed: http://github.com/openstack/openstack-common/commit/fb0f00e946eff84e855d0721830b5016fe80ea8d
Submitter: Jenkins
Branch: master

commit fb0f00e946eff84e855d0721830b5016fe80ea8d
Author: Johannes Erdfelt <email address hidden>
Date: Fri Jun 8 17:08:14 2012 +0000

    Use 'is not None' instead of '!= None'

    Fixes bug 1010570

    pep8 suggests the former over the latter

    Change-Id: Ice3a3b1cc2eea9228fffb4ee40fc360ff79054a3

Changed in openstack-common:
status: In Progress → Fix Committed
Mark McLoughlin (markmc)
Changed in openstack-common:
milestone: none → 2012.2
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.