aboutsummaryrefslogtreecommitdiffstats
path: root/packaging-tools/bld_module.py
diff options
context:
space:
mode:
authorPatrik Teivonen <patrik.teivonen@qt.io>2022-04-21 12:57:44 +0300
committerPatrik Teivonen <patrik.teivonen@qt.io>2022-05-16 07:15:29 +0000
commitac6f75fce1b3c08eeb7dac541c80d35a11ef5cc6 (patch)
treef62269d20bf4093cd8deabf24368e38d9b3273da /packaging-tools/bld_module.py
parentac52818a69b76e3cb13e6d14546d45dce5ce5f2e (diff)
Replace bldinstallercommon.remove_tree with shutil.rmtree
Use shutil.rmtree. Add onerror handler function. Change-Id: I97bd6efcc0c9328d0105399ccf55484ae70c6b5c Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'packaging-tools/bld_module.py')
-rwxr-xr-xpackaging-tools/bld_module.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/packaging-tools/bld_module.py b/packaging-tools/bld_module.py
index f1e8533d2..2b311f47f 100755
--- a/packaging-tools/bld_module.py
+++ b/packaging-tools/bld_module.py
@@ -215,9 +215,9 @@ if bldinstallercommon.is_win_platform():
### clean step
if callerArguments.clean:
print("##### {0} #####".format("clean old builds"))
- bldinstallercommon.remove_tree(callerArguments.qt5path)
- bldinstallercommon.remove_tree(qtModuleInstallDirectory)
- bldinstallercommon.remove_tree(tempPath)
+ shutil.rmtree(callerArguments.qt5path, onerror=bldinstallercommon.handle_remove_error)
+ shutil.rmtree(qtModuleInstallDirectory, onerror=bldinstallercommon.handle_remove_error)
+ shutil.rmtree(tempPath, onerror=bldinstallercommon.handle_remove_error)
if not os.path.lexists(callerArguments.qt5path) and not callerArguments.qt5_module_urls:
parser.print_help()