From cc77e6b2862733a211c55cf29cc7a83c36c27919 Mon Sep 17 00:00:00 2001 From: Kostis Anagnostopoulos Date: Mon, 17 Oct 2016 21:19:44 +0200 Subject: tc-helper: fix minor contexlib abuse --- git/test/lib/helper.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'git/test/lib/helper.py') 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: -- cgit v1.2.1