mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-09 23:10:24 +01:00
outs: raise exception if no cache location setup for s3/gs
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user