Skip to content
This repository was archived by the owner on Jul 29, 2021. It is now read-only.

Commit 06c1c7d

Browse files
committed
scripts: fix update_deps retry clone
There was a subtle bug in the original change; "git fetch" would retry correctly, but "git clone" failed because the destination directory was missing (after having been removed, to ensure a clean clone operation). The test case that was used (hundreds of times) happened to provoke an error on the "git fetch" path; I was unaware that the "git clone" failure path had never been exercised.
1 parent 864ab45 commit 06c1c7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/update_deps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,8 @@ def __init__(self, json, args):
345345

346346
def Clone(self, retries=10, retry_seconds=60):
347347
print('Cloning {n} into {d}'.format(n=self.name, d=self.repo_dir))
348-
distutils.dir_util.mkpath(self.repo_dir)
349348
for retry in range(retries):
349+
distutils.dir_util.mkpath(self.repo_dir)
350350
try:
351351
command_output(['git', 'clone', self.url, '.'], self.repo_dir)
352352
# If we get here, we didn't raise an error

0 commit comments

Comments
 (0)