Make setup_links.py handle non-link directories during cleanup
The trybots ended up in a state that could not be cleaned up when other tryjobs were altering the checkout with different variations of dependencies. TBR=pbos@webrtc.org Review URL: https://webrtc-codereview.appspot.com/46139004 Cr-Commit-Position: refs/heads/master@{#9110}
This commit is contained in:
parent
1ba344a070
commit
c444de6276
@ -348,7 +348,8 @@ class WebRTCLinkSetup():
|
|||||||
if not self._dry_run:
|
if not self._dry_run:
|
||||||
if os.path.exists(link_path):
|
if os.path.exists(link_path):
|
||||||
if sys.platform.startswith('win') and os.path.isdir(link_path):
|
if sys.platform.startswith('win') and os.path.isdir(link_path):
|
||||||
subprocess.check_call(['rmdir', '/q', link_path], shell=True)
|
subprocess.check_call(['rmdir', '/q', '/s', link_path],
|
||||||
|
shell=True)
|
||||||
else:
|
else:
|
||||||
os.remove(link_path)
|
os.remove(link_path)
|
||||||
del self._links_db[source]
|
del self._links_db[source]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user