Repository: beam Updated Branches: refs/heads/master f10ee01fb -> 7bb10a694
Additional explicit file cleanup in gen_protos. Project: http://git-wip-us.apache.org/repos/asf/beam/repo Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/a75f41cc Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/a75f41cc Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/a75f41cc Branch: refs/heads/master Commit: a75f41cc575dba2e5d1c650c0226a91d7ebe125a Parents: f10ee01 Author: Robert Bradshaw <[email protected]> Authored: Thu May 25 17:07:08 2017 -0700 Committer: Robert Bradshaw <[email protected]> Committed: Thu May 25 17:07:59 2017 -0700 ---------------------------------------------------------------------- sdks/python/gen_protos.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/beam/blob/a75f41cc/sdks/python/gen_protos.py ---------------------------------------------------------------------- diff --git a/sdks/python/gen_protos.py b/sdks/python/gen_protos.py index bb8592d..92b8414 100644 --- a/sdks/python/gen_protos.py +++ b/sdks/python/gen_protos.py @@ -111,9 +111,12 @@ def _install_grpcio_tools_and_generate_proto_files(): if os.path.exists(build_path): shutil.rmtree(build_path) logging.warning('Installing grpcio-tools into %s' % install_path) - subprocess.check_call( - ['pip', 'install', '--target', install_path, '--build', build_path, - '--upgrade', GRPC_TOOLS]) + try: + subprocess.check_call( + ['pip', 'install', '--target', install_path, '--build', build_path, + '--upgrade', GRPC_TOOLS]) + finally: + shutil.rmtree(build_path) sys.path.append(install_path) generate_proto_files()
