Align git exception messages

There were some inconsistencies around whether string parameter passed
into Git exceptions is called repo_path or repo_url, causing the
exception detail to occasionally not get rendered.  This change
standardizes on repo_url.

Change-Id: Ibc78b33cc0e1fcd67820954b715f480a5b1f6496
This commit is contained in:
Matt McEuen 2019-07-10 14:45:21 -05:00
parent e79672987e
commit 5d5a27a237
2 changed files with 3 additions and 3 deletions

View File

@ -59,12 +59,12 @@ class GitSSHException(PeglegBaseException):
class GitConfigException(PeglegBaseException):
"""Exception that occurs when reading Git repo config fails."""
message = 'Failed to read Git config file for repo path: %(repo_path)s'
message = 'Failed to read Git config file for repo path: %(repo_url)s'
class GitInvalidRepoException(PeglegBaseException):
"""Exception raised when an invalid repository is detected."""
message = 'The repository path or URL is invalid: %(repo_path)s'
message = 'The repository path or URL is invalid: %(repo_url)s'
class GitMissingUserException(PeglegBaseException):

View File

@ -490,6 +490,6 @@ def normalize_repo_path(repo_url_or_path):
orig_repo_url_or_path)
LOG.error(msg)
raise exceptions.GitInvalidRepoException(
repo_path=orig_repo_url_or_path)
repo_url=orig_repo_url_or_path)
return repo_url_or_path, sub_path