diff options
author | David Aguilar <davvid@gmail.com> | 2008-06-12 02:57:00 -0700 |
---|---|---|
committer | David Aguilar <davvid@gmail.com> | 2008-06-12 02:57:00 -0700 |
commit | 52654c0216dcbe3fa2d9afb1de12c65d18f6a7a4 (patch) | |
tree | a24aac921256040e6243a6352e95228bb921a33d /lib/git/repo.py | |
parent | c5083752d5d02d6c46bc2f18ba53a28d119af5b9 (diff) | |
download | gitpython-52654c0216dcbe3fa2d9afb1de12c65d18f6a7a4.tar.gz |
repo: these changes make Govind's latest changes pass the test cases
Signed-off-by: David Aguilar <davvid@gmail.com>
Diffstat (limited to 'lib/git/repo.py')
-rw-r--r-- | lib/git/repo.py | 7 |
1 files changed, 6 insertions, 1 deletions
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 |