From 52654c0216dcbe3fa2d9afb1de12c65d18f6a7a4 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Thu, 12 Jun 2008 02:57:00 -0700 Subject: repo: these changes make Govind's latest changes pass the test cases Signed-off-by: David Aguilar --- lib/git/repo.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/git/repo.py') diff --git a/lib/git/repo.py b/lib/git/repo.py index 72291dc9..8b519c1c 100644 --- a/lib/git/repo.py +++ b/lib/git/repo.py @@ -27,9 +27,14 @@ class Repo(object): Returns ``GitPython.Repo`` """ + if not os.path.exists(path): + raise NoSuchPathError(path) + self.git = Git(path) - epath = self.git.get_work_tree() self.path = self.git.get_git_dir() + if not self.path: + raise InvalidGitRepositoryError(path) + epath = self.git.get_work_tree() if os.path.exists(os.path.join(epath, '.git')): self.bare = False -- cgit v1.2.1