Skip to content

Commit 7b91162

Browse files
authored
Merge pull request #103 from mikedarcy/master
Fix for self.algorithms duplication issue in _load_manifests.
2 parents 1aa5090 + deea596 commit 7b91162

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)