From: Zack Cerza Date: Wed, 25 Jun 2014 20:40:44 +0000 (-0600) Subject: Generalize error message X-Git-Tag: 1.1.0~1359^2~15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6e3e6693d157db9aa7b0ba5fd988ca11f90125a0;p=teuthology.git Generalize error message Signed-off-by: Zack Cerza --- diff --git a/teuthology/repo_utils.py b/teuthology/repo_utils.py index b34b15a5..50d64236 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)