Skip to content

Commit deea596

Browse files
committed
Fix self.algorithms duplication issue in _load_manifests.
1 parent 1aa5090 commit deea596

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

bagit.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,8 @@ def _load_manifests(self):
564564
else:
565565
search = "manifest-"
566566
alg = os.path.basename(manifest_filename).replace(search, "").replace(".txt", "")
567-
self.algorithms.append(alg)
567+
if alg not in self.algorithms:
568+
self.algorithms.append(alg)
568569

569570
with open_text_file(manifest_filename, 'r', encoding=self.encoding) as manifest_file:
570571
if manifest_file.encoding.startswith('UTF'):

0 commit comments

Comments
 (0)