Merge "Stop using a mutable default param in fragments_needed"

This commit is contained in:
Zuul 2021-05-11 06:41:04 +00:00 committed by Gerrit Code Review
commit 77028c8d87

View File

@ -312,7 +312,7 @@ class ECDriver(object):
available_fragment_payloads, missing_fragment_indexes)
def fragments_needed(self, reconstruction_indexes,
exclude_indexes=[]):
exclude_indexes=None):
"""
Determine which fragments are needed to reconstruct some subset of
missing fragments.
@ -329,6 +329,8 @@ class ECDriver(object):
:raises: ECDriverError if there is an error during decoding or there
are not sufficient fragments to decode
"""
if exclude_indexes is None:
exclude_indexes = []
return self.ec_lib_reference.fragments_needed(reconstruction_indexes,
exclude_indexes)