Skip to content

Commit

Permalink
Put message into exception def. and fix url link
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasfratrik committed Jul 19, 2024
1 parent b294a98 commit 3bd08f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,11 @@ def get_repositories_status():
return RepositoriesFacts(repositories=repofileutils.get_parsed_repofiles())
except repofileutils.InvalidRepoDefinition as e:
raise StopActorExecutionError(
message='Invalid repository definition',
message=str(e),
details={
'details': str(e),
'file': e.repofile,
'repoid': e.repoid,
'hint': 'To resolve this issue, please visit: {url}'
'hint': 'For more directions on how to resolve the issue, see: {url}.'
.format(
url='https://access.redhat.com/solutions/3185891'
url='https://access.redhat.com/solutions/6969001'
)
}
)
Expand Down
4 changes: 3 additions & 1 deletion repos/system_upgrade/common/libraries/repofileutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@


class InvalidRepoDefinition(Exception):
def __init__(self, message, repofile=None, repoid=None):
def __init__(self, msg, repofile=None, repoid=None):
message = 'Invalid repository definition: {repoid} in: {repofile}: {msg}'.format(
repoid=repoid, repofile=repofile, msg=msg)
super(InvalidRepoDefinition, self).__init__(message)
self.repofile = repofile
self.repoid = repoid
Expand Down

0 comments on commit 3bd08f8

Please sign in to comment.