diff --git a/dvc/output/gs.py b/dvc/output/gs.py index f0d037824..65808386d 100644 --- a/dvc/output/gs.py +++ b/dvc/output/gs.py @@ -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() diff --git a/dvc/output/s3.py b/dvc/output/s3.py index 12db2a8b7..5df547d86 100644 --- a/dvc/output/s3.py +++ b/dvc/output/s3.py @@ -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()