diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-06-24 19:41:43 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-06-24 19:41:46 +0200 |
commit | feb1ea0f4aacb9ea6dc4133900e65bf34c0ee02d (patch) | |
tree | 042d920af46e7a5774107e390a3962afa8390388 /test/testlib/helper.py | |
parent | 55dcc17c331f580b3beeb4d5decf64d3baf94f2e (diff) | |
download | gitpython-feb1ea0f4aacb9ea6dc4133900e65bf34c0ee02d.tar.gz |
GitCmdStreamReader: fixed terrible bug which only kicked in if the stream was actually empty. This is a rare case that can happen during stream testing. Theoretically there shouldn't be any empty streams of course, but practically they do exist sometimes ;); fixed stream.seek implementation, which previously used seek on standard output
Improved GitCmd error handling
Diffstat (limited to 'test/testlib/helper.py')
-rw-r--r-- | test/testlib/helper.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/testlib/helper.py b/test/testlib/helper.py index 3a5d7b8f..4399561c 100644 --- a/test/testlib/helper.py +++ b/test/testlib/helper.py @@ -109,11 +109,14 @@ def with_rw_repo(working_tree_ref): return func(self, rw_repo) except: print >> sys.stderr, "Keeping repo after failure: %s" % repo_dir + repo_dir = None raise finally: os.chdir(prev_cwd) rw_repo.git.clear_cache() - shutil.rmtree(repo_dir, onerror=_rmtree_onerror) + if repo_dir is not None: + shutil.rmtree(repo_dir, onerror=_rmtree_onerror) + # END rm test repo if possible # END cleanup # END rw repo creator repo_creator.__name__ = func.__name__ |