Should not use mutable default arguments in function definitions

Bug #1526140 reported by Wang Bo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Wang Bo

Bug Description

Refer to: http://docs.python-guide.org/en/latest/writing/gotchas/.
We should not use mutable default arguments in function definitions.

So we need remove the default arguments "[]" and "{}" in function definitions. "[]" has been removed in patch: https://review.openstack.org/#/c/256931/2. We also need fix the code incorrectly using "{}".

Wang Bo (chestack)
Changed in horizon:
assignee: nobody → Wang Bo (chestack)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

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

Reviewed: https://review.openstack.org/257677
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=7e02c996e8f338c557958ddfcc794d2432f83215
Submitter: Jenkins
Branch: master

commit 7e02c996e8f338c557958ddfcc794d2432f83215
Author: Bo Wang <email address hidden>
Date: Tue Dec 15 12:13:17 2015 +0800

    Remove arguments "{}" in function definitions

    remove mutable default arguments "{}" in function definitions
    refer to:http://docs.python-guide.org/en/latest/writing/gotchas/

    Close-Bug: #1526140

    Change-Id: Ib85bd0238beaac95c53d9ae1779a5d566db9eb16

Wang Bo (chestack)
Changed in horizon:
status: New → Fix Committed
Changed in horizon:
importance: Undecided → Low
milestone: none → mitaka-2
Changed in horizon:
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.