Merge "Avoid mutable default args in _test_populate_filter_props"
This commit is contained in:
@@ -97,8 +97,12 @@ class SchedulerUtilsTestCase(test.NoDBTestCase):
|
|||||||
|
|
||||||
def _test_populate_filter_props(self, host_state_obj=True,
|
def _test_populate_filter_props(self, host_state_obj=True,
|
||||||
with_retry=True,
|
with_retry=True,
|
||||||
force_hosts=[],
|
force_hosts=None,
|
||||||
force_nodes=[]):
|
force_nodes=None):
|
||||||
|
if force_hosts is None:
|
||||||
|
force_hosts = []
|
||||||
|
if force_nodes is None:
|
||||||
|
force_nodes = []
|
||||||
if with_retry:
|
if with_retry:
|
||||||
if not force_hosts and not force_nodes:
|
if not force_hosts and not force_nodes:
|
||||||
filter_properties = dict(retry=dict(hosts=[]))
|
filter_properties = dict(retry=dict(hosts=[]))
|
||||||
|
|||||||
Reference in New Issue
Block a user