diff options
author | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-17 21:19:44 +0200 |
---|---|---|
committer | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-17 21:19:44 +0200 |
commit | cc77e6b2862733a211c55cf29cc7a83c36c27919 (patch) | |
tree | 43eb66bb883e6cb2c5e9262ddcdc4c4827ff1ad0 /git/test/lib/helper.py | |
parent | 08e0d5f107da2e354a182207d5732b0e48535b66 (diff) | |
download | gitpython-cc77e6b2862733a211c55cf29cc7a83c36c27919.tar.gz |
tc-helper: fix minor contexlib abuse
Diffstat (limited to 'git/test/lib/helper.py')
-rw-r--r-- | git/test/lib/helper.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/git/test/lib/helper.py b/git/test/lib/helper.py index a8b28ecd..871cbe93 100644 --- a/git/test/lib/helper.py +++ b/git/test/lib/helper.py @@ -181,9 +181,6 @@ def git_daemon_launched(base_path, ip, port): as_process=True) # yes, I know ... fortunately, this is always going to work if sleep time is just large enough time.sleep(0.5 * (1 + is_win)) - - yield - except Exception as ex: msg = textwrap.dedent(""" Launching git-daemon failed due to: %s @@ -203,8 +200,10 @@ def git_daemon_launched(base_path, ip, port): CYGWIN has no daemon, but if one exists, it gets along fine (but has also paths problems).""") log.warning(msg, ex, ip, port, base_path, base_path, exc_info=1) - yield + yield # OK, assume daemon started manually. + else: + yield # Yield outside try, to avoid catching finally: if gd: try: |