MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / __remove_tree

Function __remove_tree

tools/donate_cpu_lib.py:303–316  ·  view source on GitHub ↗
(folder_name)

Source from the content-addressed store, hash-verified

301
302
303def __remove_tree(folder_name):
304 if not os.path.exists(folder_name):
305 return
306
307 def rmtree_func():
308 # pylint: disable=deprecated-argument - FIXME: onerror was deprecated in Python 3.12
309 shutil.rmtree(folder_name, onerror=__handle_remove_readonly)
310
311 print('Removing existing temporary data...')
312 try:
313 try_retry(rmtree_func, max_tries=5, sleep_duration=30, sleep_factor=1)
314 except Exception as e:
315 print('Failed to cleanup {}: {}'.format(folder_name, e))
316 sys.exit(1)
317
318
319def __wget(url, destfile, bandwidth_limit):

Callers 1

unpack_packageFunction · 0.85

Calls 3

try_retryFunction · 0.85
formatMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected