[FIX] script git change remote, ignore when repo not exist
This commit is contained in:
parent
7d88751391
commit
60f78db43b
1 changed files with 6 additions and 1 deletions
|
|
@ -54,7 +54,12 @@ def main():
|
||||||
for repo in lst_repo:
|
for repo in lst_repo:
|
||||||
i += 1
|
i += 1
|
||||||
print(f"Nb element {i}/{total}")
|
print(f"Nb element {i}/{total}")
|
||||||
repo_sm = Repo(repo.get("name"))
|
repo_name = repo.get("name")
|
||||||
|
relative_path = os.path.join(new_path, repo_name)
|
||||||
|
if not os.path.isdir(relative_path):
|
||||||
|
print(f"Ignore repo {relative_path}")
|
||||||
|
continue
|
||||||
|
repo_sm = Repo(repo_name)
|
||||||
if upstream_name:
|
if upstream_name:
|
||||||
remote_upstream_name = [a for a in repo_sm.remotes
|
remote_upstream_name = [a for a in repo_sm.remotes
|
||||||
if upstream_name == a.name]
|
if upstream_name == a.name]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue