Skip to content

Commit 7025d8a

Browse files
arash77mvdbeek
andcommitted
Update src/ephemeris/shed_tools.py
Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>
1 parent 69ab72a commit 7025d8a

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

src/ephemeris/shed_tools.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,11 @@ def filter_installed_repos(self, repos: Iterable[InstallRepoDict], check_revisio
168168
revision = repo.get("changeset_revision") if check_revision else None
169169
key = (name, owner, revision)
170170

171-
found = False
172-
if key in installed_lookup:
173-
for installed_repo in installed_lookup[key]:
174-
if the_same_repository(repo, installed_repo):
175-
already_installed_repos.append(repo)
176-
found = True
177-
break
178-
if not found: # This executes when the for loop completes and no match has been found.
171+
for installed_repo in installed_lookup.get(key, []):
172+
if the_same_repository(repo, installed_repo):
173+
already_installed_repos.append(repo)
174+
break
175+
else: # This executes when the for loop completes and no match has been found.
179176
not_installed_repos.append(repo)
180177
return FilterResults(
181178
already_installed_repos=already_installed_repos,

0 commit comments

Comments
 (0)