Mutable objects are being used as default value of param
Bug #1330322 reported by
Ghanshyam Mann
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tempest |
Fix Released
|
Undecided
|
Ghanshyam Mann |
Bug Description
In many places mutable objects like list, dict are being used as default value of param.
This create issues as default values are being evaluated only during definition of function not at runtime when those are being called. And in case of mutable objects as default value, it maintain its state between function call. One function call can change the value of mutable object which reflects in another function call and can create the issue.
Those needs to be replace by taking default value as 'None' and have if else condition accordingly in function def.
Changed in tempest: | |
assignee: | nobody → Ghanshyam Mann (ghanshyammann) |
To post a comment you must log in.
Fix proposed to branch: master /review. openstack. org/100132
Review: https:/