From 6e3e6693d157db9aa7b0ba5fd988ca11f90125a0 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Wed, 25 Jun 2014 14:40:44 -0600 Subject: [PATCH] Generalize error message Signed-off-by: Zack Cerza --- teuthology/repo_utils.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/teuthology/repo_utils.py b/teuthology/repo_utils.py index b34b15a58347c..50d64236f4d7d 100644 --- a/teuthology/repo_utils.py +++ b/teuthology/repo_utils.py @@ -44,12 +44,14 @@ def checkout_repo(repo_url, dest_path, branch): ) except subprocess.CalledProcessError: shutil.rmtree(dest_path) - raise BranchNotFoundError(branch) + raise BranchNotFoundError(branch, repo_url) class BranchNotFoundError(ValueError): - def __init__(self, branch): + def __init__(self, branch, repo): self.branch = branch + self.repo = repo def __str__(self): - return "teuthology branch not found: '{0}'".format(self.branch) + return "Branch {branch} not found in repo: {repo}".format( + branch=self.branch, repo=self.repo) -- 2.39.5