File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ def source_repos(config, examples):
169
169
170
170
subprocess .call (["mbed-cli" , "import" , repo_info ['repo' ]])
171
171
172
- def clone_repos (config , examples ):
172
+ def clone_repos (config , examples , retry = 3 ):
173
173
""" Clones each of the repos associated with the specific examples name from the
174
174
json config file. Note if there is already a clone of the repo then it will first
175
175
be removed to ensure a clean, up to date cloning.
@@ -185,8 +185,11 @@ def clone_repos(config, examples):
185
185
if os .path .exists (name ):
186
186
print ("'%s' example directory already exists. Deleting..." % name )
187
187
rmtree (name )
188
-
189
- subprocess .call ([repo_info ['type' ], "clone" , repo_info ['repo' ]])
188
+ for i in range (0 , retry ):
189
+ if subprocess .call ([repo_info ['type' ], "clone" , repo_info ['repo' ]]) == 0 :
190
+ break
191
+ else :
192
+ print ("ERROR : unable to clone the repo {}" .format (name ))
190
193
191
194
def deploy_repos (config , examples ):
192
195
""" If the example directory exists as provided by the json config file,
You can’t perform that action at this time.
0 commit comments