Skip to content

Commit

Permalink
gc: don't forget to load remote index (#3660)
Browse files Browse the repository at this point in the history
Kudos @pmrowla
  • Loading branch information
efiop authored Apr 21, 2020
1 parent b04964f commit bca5edf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions dvc/remote/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,9 @@ def __init__(self, checksum):
def index_locked(f):
@wraps(f)
def wrapper(remote_obj, *args, **kwargs):
remote = kwargs.get("remote")
if remote:
with remote.index:
return f(remote_obj, *args, **kwargs)
return f(remote_obj, *args, **kwargs)
remote = kwargs.get("remote", remote_obj)
with remote.index:
return f(remote_obj, *args, **kwargs)

return wrapper

Expand Down

0 comments on commit bca5edf

Please sign in to comment.