revert cache_dir move

partially reverts 5f81352f
This commit is contained in:
Casper da Costa-Luis
2019-08-28 18:02:50 +01:00
parent 7be68d9448
commit 6c3029dede
2 changed files with 7 additions and 9 deletions
-8
View File
@@ -140,14 +140,6 @@ class RemoteBASE(object):
def cache(self):
return getattr(self.repo.cache, self.scheme)
@property
def cache_dir(self):
return (
getattr(self.path_info, "fspath", self.path_info.url)
if self.path_info
else None
)
def get_file_checksum(self, path_info):
raise NotImplementedError
+7 -1
View File
@@ -97,6 +97,10 @@ class RemoteLOCAL(RemoteBASE):
def state(self):
return self.repo.state
@property
def cache_dir(self):
return self.path_info.fspath if self.path_info else None
@classmethod
def supported(cls, config):
return True
@@ -332,7 +336,9 @@ class RemoteLOCAL(RemoteBASE):
else:
logger.debug("Collecting information from remote cache...")
remote_exists = list(
remote.cache_exists(md5s, jobs=jobs, name=remote.cache_dir)
remote.cache_exists(
md5s, jobs=jobs, name=str(remote.path_info)
)
)
self._fill_statuses(ret, local_exists, remote_exists)