From d093d9723b7c6c8387a99fca8714d9fba600fc6a Mon Sep 17 00:00:00 2001 From: Bob Ellison Date: Wed, 15 Jul 2020 15:15:28 -0600 Subject: 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. --- scripts/update_deps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/update_deps.py b/scripts/update_deps.py index 658dcf54..ea21c9fb 100755 --- a/scripts/update_deps.py +++ b/scripts/update_deps.py @@ -345,8 +345,8 @@ class GoodRepo(object): def Clone(self, retries=10, retry_seconds=60): print('Cloning {n} into {d}'.format(n=self.name, d=self.repo_dir)) - distutils.dir_util.mkpath(self.repo_dir) for retry in range(retries): + distutils.dir_util.mkpath(self.repo_dir) try: command_output(['git', 'clone', self.url, '.'], self.repo_dir) # If we get here, we didn't raise an error -- cgit v1.2.3