commit 0bea84ac20fe498bd08f7212a0017196c8cb0812
Author: ChangBo Guo(gcb) <email address hidden>
Date: Sat Jun 7 10:49:20 2014 +0800
Removes the use of mutables as default args
Passing mutable objects as default args is a known Python pitfall.
We'd better avoid this. This commit changes mutable default args with
None, then use 'arg = arg or {}', 'arg = arg or []'. For unit code which
doesn't use the args , just set with None. This commit also adds hacking
check.
Reviewed: https:/ /review. openstack. org/98339 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=0bea84ac20f e498bd08f7212a0 017196c8cb0812
Committed: https:/
Submitter: Jenkins
Branch: master
commit 0bea84ac20fe498 bd08f7212a00171 96c8cb0812
Author: ChangBo Guo(gcb) <email address hidden>
Date: Sat Jun 7 10:49:20 2014 +0800
Removes the use of mutables as default args
Passing mutable objects as default args is a known Python pitfall.
We'd better avoid this. This commit changes mutable default args with
None, then use 'arg = arg or {}', 'arg = arg or []'. For unit code which
doesn't use the args , just set with None. This commit also adds hacking
check.
Closes-Bug: #1327473 e000b13b6bdfaef 1968b96f816
Change-Id: I5a8492bf8ffef8