mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
Bugfix: checkout - handle files with missing caches
This commit is contained in:
+6
-1
@@ -125,7 +125,12 @@ class Output(object):
|
||||
def checkout(self):
|
||||
if not self.use_cache:
|
||||
return
|
||||
self.link(checkout=True)
|
||||
if not os.path.exists(self.cache):
|
||||
self.project.logger.warn(u'\'{}\': cache file not found'.format(self.dvc_path))
|
||||
if os.path.exists(self.path):
|
||||
os.unlink(self.path)
|
||||
else:
|
||||
self.link(checkout=True)
|
||||
|
||||
def mtime(self):
|
||||
return os.path.getmtime(self.path)
|
||||
|
||||
Reference in New Issue
Block a user