Update dvc/repo/index.py

Co-authored-by: Saugat Pachhai <[email protected]>
This commit is contained in:
Fabian Zills
2022-04-07 21:05:47 +05:45
committed by Saugat Pachhai
co-authored by Saugat Pachhai
parent 65d935e5c7
commit 7804e6550e
+1 -1
View File
@@ -93,7 +93,7 @@ class Index:
def __getitem__(self, item: str) -> "Stage":
"""Get a stage by its addressing attribute."""
for stage in self.stages:
for stage in self:
if stage.addressing == item:
return stage
raise KeyError(f"{item} - available stages are {self.stages}")