]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Generalize error message
authorZack Cerza <zack@cerza.org>
Wed, 25 Jun 2014 20:40:44 +0000 (14:40 -0600)
committerZack Cerza <zack@cerza.org>
Fri, 27 Jun 2014 16:14:06 +0000 (10:14 -0600)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/repo_utils.py

index b34b15a58347c78a59bcea6d69c38d7b94c6de0c..50d64236f4d7d5760c183ab7b523c56b3e7ad42d 100644 (file)
@@ -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)