Browse Source

Avoiding usage of mutables as default arguments

Using Mutables objects as default arguments in function
definition is a known Python pitfall. This patch fixes
the issue in neutron-lbaas.

Change-Id: Idb1cccbebec5dfedde04ee474036e67569406caa
Closes-Bug: #1327473
(cherry picked from commit 0aac2d029a)
changes/34/242534/1
Reedip Banerjee 6 years ago
committed by Ihar Hrachyshka
parent
commit
a9ad175f0b
  1. 3
      neutron_lbaas/tests/unit/services/loadbalancer/drivers/haproxy/sample_configs/sample_configs.py

3
neutron_lbaas/tests/unit/services/loadbalancer/drivers/haproxy/sample_configs/sample_configs.py

@ -192,8 +192,9 @@ def sample_tls_sni_container_tuple(tls_container=None, tls_container_id=None):
def sample_tls_container_tuple(id='cont_id_1', certificate=None,
private_key=None, intermediates=[],
private_key=None, intermediates=None,
primary_cn=None):
intermediates = intermediates or []
sc = collections.namedtuple(
'tls_cert',
'id, certificate, private_key, intermediates, primary_cn')

Loading…
Cancel
Save