From feb1ea0f4aacb9ea6dc4133900e65bf34c0ee02d Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 24 Jun 2010 19:41:43 +0200 Subject: 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 --- test/testlib/helper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test') 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__ -- cgit v1.2.1