diff --git a/dvc/output/base.py b/dvc/output/base.py index 120489d19d..8344f1f3d7 100644 --- a/dvc/output/base.py +++ b/dvc/output/base.py @@ -170,12 +170,7 @@ def exists(self): return self.remote.exists(self.path_info) def changed_checksum(self): - return ( - self.checksum - != self.remote.save_info(self.path_info)[ - self.remote.PARAM_CHECKSUM - ] - ) + return self.checksum != self.remote.get_checksum(self.path_info) def changed_cache(self): if not self.use_cache or not self.checksum: diff --git a/dvc/remote/base.py b/dvc/remote/base.py index 011b0af4aa..10969250a0 100644 --- a/dvc/remote/base.py +++ b/dvc/remote/base.py @@ -293,6 +293,8 @@ def is_dir_checksum(cls, checksum): return checksum.endswith(cls.CHECKSUM_DIR_SUFFIX) def get_checksum(self, path_info): + assert path_info.scheme == self.scheme + if not self.exists(path_info): return None @@ -322,7 +324,6 @@ def get_checksum(self, path_info): return checksum def save_info(self, path_info): - assert path_info.scheme == self.scheme return {self.PARAM_CHECKSUM: self.get_checksum(path_info)} def changed(self, path_info, checksum_info): @@ -363,7 +364,7 @@ def changed(self, path_info, checksum_info): ) return True - actual = self.save_info(path_info)[self.PARAM_CHECKSUM] + actual = self.get_checksum(path_info) if checksum != actual: logger.debug( "checksum '{}'(actual '{}') for '{}' has changed.".format(