Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4B69E200C8F for ; Fri, 26 May 2017 02:43:52 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4A23C160BD8; Fri, 26 May 2017 00:43:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B9520160BCA for ; Fri, 26 May 2017 02:43:51 +0200 (CEST) Received: (qmail 98107 invoked by uid 500); 26 May 2017 00:43:51 -0000 Mailing-List: contact commits-help@beam.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@beam.apache.org Delivered-To: mailing list commits@beam.apache.org Received: (qmail 98098 invoked by uid 99); 26 May 2017 00:43:50 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 May 2017 00:43:50 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C2BC4DFFB7; Fri, 26 May 2017 00:43:50 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: robertwb@apache.org To: commits@beam.apache.org Date: Fri, 26 May 2017 00:43:50 -0000 Message-Id: <40a3ca50276e49a881c5da5b30c146b8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] beam git commit: Additional explicit file cleanup in gen_protos. archived-at: Fri, 26 May 2017 00:43:52 -0000 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 Authored: Thu May 25 17:07:08 2017 -0700 Committer: Robert Bradshaw 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()