Skip to content

Commit

Permalink
Call __init__ from base Exception class in custom exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
jrha committed Aug 2, 2024
1 parent 57cd13a commit 417ae3d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@ def repomd(self):
class MrepoMirrorException(Exception):
def __init__(self, value):
self.value = value
Exception.__init__(self)

def __str__(self):
return repr(self.value)
Expand All @@ -664,6 +665,7 @@ def __str__(self):
class MrepoGenerateException(Exception):
def __init__(self, value):
self.value = value
Exception.__init__(self)

def __str__(self):
return repr(self.value)
Expand Down

0 comments on commit 417ae3d

Please sign in to comment.