use the fact that empty sequences are false for sequences(lists,strings,tuples)

Bug #1133094 reported by shu, xinxin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Wishlist
shu, xinxin

Bug Description

for sequences, use the fact that empty sequences are false

Yes: if not seq:
     if seq:

No: if len(seq)
    if not len(seq)

shu, xinxin (xinxin-shu)
description: updated
shu, xinxin (xinxin-shu)
description: updated
Revision history for this message
Brian Waldon (bcwaldon) wrote :

There may be some places where this change is ok, but this is functionally different code.

Changed in glance:
importance: Undecided → Wishlist
status: New → Triaged
shu, xinxin (xinxin-shu)
Changed in glance:
assignee: nobody → shu, xinxin (xinxin-shu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

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

Reviewed: https://review.openstack.org/23145
Committed: http://github.com/openstack/glance/commit/0f2d8d4d7c83829a1e78150cbe946068080f9631
Submitter: Jenkins
Branch: master

commit 0f2d8d4d7c83829a1e78150cbe946068080f9631
Author: shu,xinxin <email address hidden>
Date: Fri Feb 16 03:25:45 2001 +0800

    fixes use the fact that empty sequences are false

    fixed bug #1133094

    Change-Id: Ie0514be1cb0ed6741f96334f7457da331f0eebc9

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → havana-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: havana-1 → 2013.2
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.