summaryrefslogtreecommitdiffstats
path: root/subcmds/gitc_delete.py
diff options
context:
space:
mode:
authorRenaud Paquay <rpaquay@google.com>2016-11-03 10:37:53 -0700
committerDavid Pursehouse <dpursehouse@collab.net>2017-05-29 19:32:31 +0900
commita65adf74f990eeac0d90011476376c7239cb7af5 (patch)
tree9278d9ce7c8d68a85dd049ed1ea5b64d84135fc0 /subcmds/gitc_delete.py
parentd5cec5e752821ca2710101b626b3a3ca07fdb7f8 (diff)
downloadgit-repo-a65adf74f990eeac0d90011476376c7239cb7af5.tar.gz
Workaround shutil.rmtree limitation on Windows
By default, shutil.rmtree raises an exception when deleting readonly files on Windows. Replace all shutil.rmtree with platform_utils.rmtree, which adds an error handler to make files read-write when they can't be deleted. Change-Id: I9cfea9a7b3703fb16a82cf69331540c2c179ed53
Diffstat (limited to 'subcmds/gitc_delete.py')
-rw-r--r--subcmds/gitc_delete.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/subcmds/gitc_delete.py b/subcmds/gitc_delete.py
index 19caac5a..54f62f46 100644
--- a/subcmds/gitc_delete.py
+++ b/subcmds/gitc_delete.py
@@ -14,10 +14,10 @@
14# limitations under the License. 14# limitations under the License.
15 15
16from __future__ import print_function 16from __future__ import print_function
17import shutil
18import sys 17import sys
19 18
20from command import Command, GitcClientCommand 19from command import Command, GitcClientCommand
20import platform_utils
21 21
22from pyversion import is_python3 22from pyversion import is_python3
23if not is_python3(): 23if not is_python3():
@@ -50,4 +50,4 @@ and all locally downloaded sources.
50 if not response == 'yes': 50 if not response == 'yes':
51 print('Response was not "yes"\n Exiting...') 51 print('Response was not "yes"\n Exiting...')
52 sys.exit(1) 52 sys.exit(1)
53 shutil.rmtree(self.gitc_manifest.gitc_client_dir) 53 platform_utils.rmtree(self.gitc_manifest.gitc_client_dir)