diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-06-22 12:03:53 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-06-22 12:03:53 +0200 |
commit | 778234d544b3f58dd415aaf10679d15b01a5281f (patch) | |
tree | 57e86ae1ca34f7e3e658b1f078f705ba1b397c10 /test/testlib/helper.py | |
parent | 91725f0fc59aa05ef68ab96e9b29009ce84668a5 (diff) | |
parent | c4f49fb232acb2c02761a82acc12c4040699685d (diff) | |
download | gitpython-778234d544b3f58dd415aaf10679d15b01a5281f.tar.gz |
Merge branch 'writetree'
Diffstat (limited to 'test/testlib/helper.py')
-rw-r--r-- | test/testlib/helper.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/testlib/helper.py b/test/testlib/helper.py index 715427c2..ebff57f6 100644 --- a/test/testlib/helper.py +++ b/test/testlib/helper.py @@ -5,6 +5,7 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os +import sys from git import Repo, Remote, GitCommandError from unittest import TestCase import tempfile @@ -105,7 +106,10 @@ def with_rw_repo(working_tree_ref): os.chdir(rw_repo.working_dir) try: return func(self, rw_repo) - finally: + except: + print >> sys.stderr, "Keeping repo after failure: %s" % repo_dir + raise + else: os.chdir(prev_cwd) rw_repo.git.clear_cache() shutil.rmtree(repo_dir, onerror=_rmtree_onerror) |