Skip to content

Commit

Permalink
git: don't use first() when accessing backend properties
Browse files Browse the repository at this point in the history
  • Loading branch information
pmrowla committed Mar 30, 2022
1 parent d0c3fb4 commit 2d643b9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scmrepo/git/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ def __init__(

@property
def dir(self):
return first(self.backends.values()).dir
for backend in self.backends.values():
try:
return backend.dir
except NotImplementedError:
pass
raise NotImplementedError

@cached_property
def hooks_dir(self):
Expand Down

0 comments on commit 2d643b9

Please sign in to comment.