diff --git a/dvc/project.py b/dvc/project.py index 96e031507..056ddf2a9 100644 --- a/dvc/project.py +++ b/dvc/project.py @@ -293,19 +293,19 @@ class Project(object): def gc(self, all_branches=False): clist = self._used_cache(target=None, all_branches=all_branches) - self.cache.local.gc(clist['local']) + self.cache.local.gc(clist) if self.cache.s3: - self.cache.s3.gc(clist['s3']) + self.cache.s3.gc(clist) if self.cache.gs: - self.cache.gs.gc(clist['gs']) + self.cache.gs.gc(clist) if self.cache.ssh: - self.cache.ssh.gc(clist['ssh']) + self.cache.ssh.gc(clist) if self.cache.hdfs: - self.cache.hdfs.gc(clist['hdfs']) + self.cache.hdfs.gc(clist) def push(self, target=None, jobs=1, remote=None, all_branches=False): self.cloud.push(self._used_cache(target, all_branches)['local'], jobs, remote=remote) diff --git a/dvc/remote/gs.py b/dvc/remote/gs.py index 5a0c19206..bb100ad08 100644 --- a/dvc/remote/gs.py +++ b/dvc/remote/gs.py @@ -189,7 +189,7 @@ class RemoteGS(RemoteBase): return [self._path_to_etag(blob.name) for blob in blobs] def gc(self, checksum_infos): - used_etags = [info[self.PARAM_ETAG] for info in checksum_infos] + used_etags = [info[self.PARAM_ETAG] for info in checksum_infos['gs']] for etag in self._all_etags(): if etag in used_etags: diff --git a/dvc/remote/hdfs.py b/dvc/remote/hdfs.py index ea1e3cf19..4e000cdf4 100644 --- a/dvc/remote/hdfs.py +++ b/dvc/remote/hdfs.py @@ -173,7 +173,7 @@ class RemoteHDFS(RemoteBase): return [self._path_to_checksum(path) for path in flist] def gc(self, checksum_infos): - used_checksums = [info[self.PARAM_CHECKSUM] for info in checksum_infos] + used_checksums = [info[self.PARAM_CHECKSUM] for info in checksum_infos['hdfs']] for checksum in self._all_checksums(): if checksum in used_checksums: diff --git a/dvc/remote/local.py b/dvc/remote/local.py index 3b92ff42a..bac674cf1 100644 --- a/dvc/remote/local.py +++ b/dvc/remote/local.py @@ -327,7 +327,7 @@ class RemoteLOCAL(RemoteBase): return collected, missing def gc(self, checksum_infos): - used_md5s = [info[self.PARAM_MD5] for info in self._collect(checksum_infos)[0]] + used_md5s = [info[self.PARAM_MD5] for info in self._collect(checksum_infos['local'])[0]] for md5 in self.all(): if md5 in used_md5s: diff --git a/dvc/remote/s3.py b/dvc/remote/s3.py index 2dc1159d2..f39ed8aa3 100644 --- a/dvc/remote/s3.py +++ b/dvc/remote/s3.py @@ -229,7 +229,7 @@ class RemoteS3(RemoteBase): return [self._path_to_etag(obj.key) for obj in objects] def gc(self, checksum_infos): - used_etags = [info[self.PARAM_ETAG] for info in checksum_infos] + used_etags = [info[self.PARAM_ETAG] for info in checksum_infos['s3']] for etag in self._all(): if etag in used_etags: diff --git a/dvc/remote/ssh.py b/dvc/remote/ssh.py index e0539d206..72b9e680c 100644 --- a/dvc/remote/ssh.py +++ b/dvc/remote/ssh.py @@ -255,7 +255,7 @@ class RemoteSSH(RemoteBase): return [self._path_to_md5(path) for path in flist] def gc(self, checksum_infos): - used_md5s = [info[self.PARAM_MD5] for info in checksum_infos] + used_md5s = [info[self.PARAM_MD5] for info in checksum_infos['ssh']] for md5 in self._all_md5s(): if md5 in used_md5s: