diff options
author | Martin Wicke <wicke@google.com> | 2017-03-23 12:31:16 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-03-23 13:44:29 -0700 |
commit | bc456e361d49d1d89a74b80060c70efb51fd7d87 (patch) | |
tree | 825e04287f1e2d2ac098ca3f0fdd4e361aefd68c /tensorflow/tools/git/gen_git_source.py | |
parent | 8ca071456537e6c96ae8896c2a20b1f08b0e59d3 (diff) |
Merge changes from github.
Change: 151046259
Diffstat (limited to 'tensorflow/tools/git/gen_git_source.py')
-rwxr-xr-x | tensorflow/tools/git/gen_git_source.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tensorflow/tools/git/gen_git_source.py b/tensorflow/tools/git/gen_git_source.py index c97ce7561f..299d50c359 100755 --- a/tensorflow/tools/git/gen_git_source.py +++ b/tensorflow/tools/git/gen_git_source.py @@ -76,7 +76,11 @@ def configure(src_base_path, debug=False): # Remove and recreate the path if os.path.exists(gen_path): if os.path.isdir(gen_path): - shutil.rmtree(gen_path) + try: + shutil.rmtree(gen_path) + except PermissionError: + raise RuntimeError("Cannot delete directory %s due to permission " + "error, inspect and remove manually" % gen_path) else: raise RuntimeError("Cannot delete non-directory %s, inspect ", "and remove manually" % gen_path) |