do not use locals() for formating string

Bug #1171936 reported by Boris Pavlovic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Wishlist
Haomai Wang
OpenStack Compute (nova)
Fix Released
Wishlist
Eugene Nikanorov

Bug Description

Using of locals() for formatting string is nasty thing.

1) It is not clear as using explicit dicts
2) It could produce hidden errors during refactoring
and ... tonns of reasons why we should clean up it..

Changed in nova:
assignee: nobody → Boris Pavlovic (boris-42)
Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Wishlist
status: New → Confirmed
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/27640
Committed: http://github.com/openstack/nova/commit/2dce8c92f6cfc4fb5d6a455fe13cbc0ed6d72882
Submitter: Jenkins
Branch: master

commit 2dce8c92f6cfc4fb5d6a455fe13cbc0ed6d72882
Author: Boris Pavlovic <email address hidden>
Date: Fri May 17 17:38:51 2013 +0400

    Remove usage of locals() for formatting from nova.api.*

    Using of locals() for formatting string is a nasty thing because:
    1) It is not so clear as using explicit dicts
    2) It could produce hidden errors during refactoring
    3) Changing name of variable causes change in message
    4) Creating a lot of unused variables

    fixes bug 1171936
    Change-Id: I293d7ebb875f65cce322d4938d1ae323f3aded8d

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
status: Fix Committed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: Boris Pavlovic (boris-42) → Eugene Nikanorov (enikanorov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/32729
Committed: http://github.com/openstack/nova/commit/c3f0350598a195434bcfa3d5c5e16c04937566eb
Submitter: Jenkins
Branch: master

commit c3f0350598a195434bcfa3d5c5e16c04937566eb
Author: Eugene Nikanorov <email address hidden>
Date: Wed Jun 12 15:37:37 2013 +0400

    Remove usage of locals() from manager.py

    fixes bug 1171936

    Change-Id: Ic137327b8637104cd4b330850becd80ba20c1e1c

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
status: Fix Committed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/32855
Committed: http://github.com/openstack/nova/commit/234982d9fd66b1aad0a617564bb8af0888fda3f1
Submitter: Jenkins
Branch: master

commit 234982d9fd66b1aad0a617564bb8af0888fda3f1
Author: Eugene Nikanorov <email address hidden>
Date: Wed Jun 12 19:03:14 2013 +0400

    Remove usage of locals() from xenapi package

    fixes bug 1171936

    Some minor formatting cleanup was done as well

    Change-Id: If52c2bf1eb38b5d0072a783bd944304576a70d13

Changed in nova:
status: In Progress → Fix Committed
Haomai Wang (haomai)
Changed in cinder:
assignee: nobody → Haomai Wang (haomai)
Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/33010
Committed: http://github.com/openstack/cinder/commit/08aab97ced8763597329da56a64ef950f8567f4c
Submitter: Jenkins
Branch: master

commit 08aab97ced8763597329da56a64ef950f8567f4c
Author: Haomai Wang <email address hidden>
Date: Fri Jun 14 15:11:29 2013 +0800

    Remove usage of locals() for formatting from cinder.api.*

    Using of locals() for formatting string is a nasty thing because:
    1) It is not so clear as using explicit dicts
    2) It could produce hidden errors during refactoring
    3) Changing name of variable causes change in message
    4) Creating a lot of unused variables

    Fix bug 1171936

    Change-Id: Id6a900899db328be067b8139a49c12ce802dd415

Changed in cinder:
status: In Progress → Fix Committed
Haomai Wang (haomai)
Changed in cinder:
status: Fix Committed → In Progress
Changed in cinder:
importance: Undecided → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/33185
Committed: http://github.com/openstack/cinder/commit/a80003cd49282a41fa313a679e72d237ef51c76e
Submitter: Jenkins
Branch: master

commit a80003cd49282a41fa313a679e72d237ef51c76e
Author: Haomai Wang <email address hidden>
Date: Sun Jun 16 13:21:20 2013 +0800

    Remove usage of locals() for formatting from cinder.volume.*

    Using of locals() for formatting string is a nasty thing because:
    1) It is not so clear as using explicit dicts
    2) It could produce hidden errors during refactoring
    3) Changing name of variable causes change in message
    4) Creating a lot of unused variables

    Fix bug 1171936

    Change-Id: I806c530851527db9da251352be45b97c183241a8

Changed in cinder:
status: In Progress → Fix Committed
Changed in cinder:
milestone: none → havana-2
Haomai Wang (haomai)
Changed in cinder:
status: Fix Committed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/33671
Committed: http://github.com/openstack/nova/commit/43cf9864b9091319612926a01b07045806cfce49
Submitter: Jenkins
Branch: master

commit 43cf9864b9091319612926a01b07045806cfce49
Author: Changbin Liu <email address hidden>
Date: Wed Jun 19 12:09:28 2013 -0400

    Remove usage of locals() for formatting from nova.scheduler.*

    Using of locals() for formatting string is a nasty thing because:
    1) It is not so clear as using explicit dicts
    2) It could produce hidden errors during refactoring
    3) Changing name of variable causes change in message
    4) Creating a lot of unused variables

    fixes bug #1171936

    Change-Id: I7639631846a9145c3a18f2a704b71184ec781f45

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/33436
Committed: http://github.com/openstack/nova/commit/b68aa0aeb24ce4ec64520b1594283e8f002c6671
Submitter: Jenkins
Branch: master

commit b68aa0aeb24ce4ec64520b1594283e8f002c6671
Author: Eugene Nikanorov <email address hidden>
Date: Tue Jun 18 13:43:46 2013 +0400

    Remove locals() from nova/virt/libvirt package

    fixes bug 1171936

    Change-Id: I81198d6bc74991b184b3de2f7977ff3a9a12ac28

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/34163
Committed: http://github.com/openstack/cinder/commit/729a08a019837bf4a5cbce5eee46a0a6e8e12acd
Submitter: Jenkins
Branch: master

commit 729a08a019837bf4a5cbce5eee46a0a6e8e12acd
Author: Haomai Wang <email address hidden>
Date: Mon Jun 24 14:03:31 2013 +0800

    Remove usage of locals() for formatting from cinder.tests.*

    Using of locals() for formatting string is a nasty thing because:
    1) It is not so clear as using explicit dicts
    2) It could produce hidden errors during refactoring
    3) Changing name of variable causes change in message
    4) Creating a lot of unused variables

    Fix bug 1171936

    Change-Id: I67aa5bff650b55484ca76adf5be8555f72a4c426

Changed in cinder:
status: In Progress → Fix Committed
Haomai Wang (haomai)
Changed in cinder:
status: Fix Committed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Haomai Wang (haomai)
Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/34150
Committed: http://github.com/openstack/nova/commit/a39c7d05b793c95dab51d2508a5eff6ce7a385cb
Submitter: Jenkins
Branch: master

commit a39c7d05b793c95dab51d2508a5eff6ce7a385cb
Author: Eugene Nikanorov <email address hidden>
Date: Sun Jun 23 20:42:40 2013 +0400

    remove locals() from virt/hyperv package

    Also fix logging issue with missing local variable for
    existing placeholder

    fixes bug 1171936

    Change-Id: I6e32364983372945c2b69bb92cd3a96689b7a53c

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/34141
Committed: http://github.com/openstack/nova/commit/9e6f39a7541f19bee8856e3c3c2a6a06fbd89d4e
Submitter: Jenkins
Branch: master

commit 9e6f39a7541f19bee8856e3c3c2a6a06fbd89d4e
Author: Matt Riedemann <email address hidden>
Date: Sun Jun 23 07:15:52 2013 -0700

    Remove usage of locals() from powervm virt package

    Fixes bug 1171936

    Change-Id: I9ff8c392071102737c70a807f9bfc584729c4142

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/35287
Committed: http://github.com/openstack/nova/commit/818c13681915d1298aaab19f524c898374293291
Submitter: Jenkins
Branch: master

commit 818c13681915d1298aaab19f524c898374293291
Author: Eugene Nikanorov <email address hidden>
Date: Tue Jul 2 16:49:17 2013 +0400

    Remove locals() from virt/vmwareapi package

    fixes bug 1171936

    Change-Id: I8f5210a46a086f009efaad3733a302aaeb038e5f

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-2
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/37296
Committed: http://github.com/openstack/nova/commit/20eac6c1df2a0a78d4e29e96607b35930304ca76
Submitter: Jenkins
Branch: master

commit 20eac6c1df2a0a78d4e29e96607b35930304ca76
Author: Eugene Nikanorov <email address hidden>
Date: Tue Jul 16 21:35:49 2013 +0400

    Remove locals() from various places.

    fixes bug 1171936

    Remove usage of locals() for string formatting

    Change-Id: Ib05538095086ddefdb486c84da506af662ec5c9b

Thierry Carrez (ttx)
Changed in cinder:
milestone: havana-2 → 2013.2
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-2 → 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.