diff options
| -rw-r--r-- | scripts/remote_build.py | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/scripts/remote_build.py b/scripts/remote_build.py index 71b8b500e..7acad2870 100644 --- a/scripts/remote_build.py +++ b/scripts/remote_build.py @@ -53,14 +53,11 @@ def _find_binary(name): raise EnvironmentError(f"Unable to find '{name}' in the path") #------------------------------------------------------------------------------- -class _AutoKill(object): - def __init__(self, proc): - self._proc = proc - +class _DaemonAutoKill(object): def __del__(self): - self._proc.kill() - self._proc.wait() - pass + # Roundabout way to avoid orphaned git-daemon processes + if os.name == "nt": + os.system("taskkill /f /im git-daemon.exe") @@ -152,7 +149,7 @@ def _local(args): #stdout = daemon_log, stderr = subprocess.STDOUT ) - daemon_killer = _AutoKill(daemon) + daemon_killer = _DaemonAutoKill() # Run this script on the remote machine _header("Running SSH") @@ -261,14 +258,7 @@ if __name__ == "__main__": ret = _remote(sys.argv[2:]) raise SystemExit(ret) - try: - ret = _local(sys.argv[1:]) - raise SystemExit(ret) - except: - raise - finally: - # Roundabout way to avoid orphaned git-daemon processes - if os.name == "nt": - os.system("taskkill /f /im git-daemon.exe") + ret = _local(sys.argv[1:]) + raise SystemExit(ret) # vim: expandtab foldlevel=1 foldmethod=marker |