From a65adf74f990eeac0d90011476376c7239cb7af5 Mon Sep 17 00:00:00 2001 From: Renaud Paquay Date: Thu, 3 Nov 2016 10:37:53 -0700 Subject: 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 --- subcmds/gitc_delete.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'subcmds/gitc_delete.py') 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 @@ # limitations under the License. from __future__ import print_function -import shutil import sys from command import Command, GitcClientCommand +import platform_utils from pyversion import is_python3 if not is_python3(): @@ -50,4 +50,4 @@ and all locally downloaded sources. if not response == 'yes': print('Response was not "yes"\n Exiting...') sys.exit(1) - shutil.rmtree(self.gitc_manifest.gitc_client_dir) + platform_utils.rmtree(self.gitc_manifest.gitc_client_dir) -- cgit v1.2.3-54-g00ecf