Skip to content

Commit d3a1cfb

Browse files
committed
Ensure that error subclasses call super __init__
1 parent ccbc3b7 commit d3a1cfb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bagit.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,8 @@ class BagError(Exception):
556556

557557
class BagValidationError(BagError):
558558
def __init__(self, message, details=None):
559+
super(BagValidationError, self).__init__()
560+
559561
if details is None:
560562
details = []
561563

@@ -571,11 +573,15 @@ def __str__(self):
571573

572574
class ManifestErrorDetail(BagError):
573575
def __init__(self, path):
576+
super(ManifestErrorDetail, self).__init__()
577+
574578
self.path = path
575579

576580

577581
class ChecksumMismatch(ManifestErrorDetail):
578582
def __init__(self, path, algorithm=None, expected=None, found=None):
583+
super(ChecksumMismatch, self).__init__(path)
584+
579585
self.path = path
580586
self.algorithm = algorithm
581587
self.expected = expected

0 commit comments

Comments
 (0)