outs: raise exception if no cache location setup for s3/gs

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-06-04 22:28:14 +03:00
parent 88397ef430
commit 484b04cb68
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -1,4 +1,5 @@
from dvc.dependency.gs import DependencyGS
from dvc.exceptions import DvcException
class OutputGS(DependencyGS):
@@ -7,6 +8,8 @@ class OutputGS(DependencyGS):
def __init__(self, stage, path, info=None, cache=True):
super(OutputGS, self).__init__(stage, path, info)
self.use_cache = cache
if cache and self.project.cache.gs == None:
raise DvcException("No cache location setup for \'gs\' outputs.")
def dumpd(self):
ret = super(OutputGS, self).dumpd()
+3
View File
@@ -1,4 +1,5 @@
from dvc.dependency.s3 import DependencyS3
from dvc.exceptions import DvcException
class OutputS3(DependencyS3):
@@ -7,6 +8,8 @@ class OutputS3(DependencyS3):
def __init__(self, stage, path, info=None, cache=True):
super(OutputS3, self).__init__(stage, path, info)
self.use_cache = cache
if cache and self.project.cache.s3 == None:
raise DvcException("No cache location setup for \'s3\' outputs.")
def dumpd(self):
ret = super(OutputS3, self).dumpd()