mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 07:18:27 +01:00
Following same conventions from remotes/outsputs/dependencies. Signed-off-by: Ruslan Kuprieiev <[email protected]>
24 lines
546 B
Python
24 lines
546 B
Python
from dvc.utils.compat import urlunsplit
|
|
|
|
|
|
class PathBASE(object):
|
|
scheme = None
|
|
|
|
def __init__(self, url=None, path=None):
|
|
self.url = url
|
|
self.path = path
|
|
|
|
def __str__(self):
|
|
return self.url
|
|
|
|
|
|
class PathCloudBASE(PathBASE):
|
|
def __init__(self, bucket, url=None, path=None):
|
|
super(PathCloudBASE, self).__init__(url, path)
|
|
self.bucket = bucket
|
|
|
|
def __str__(self):
|
|
if not self.url:
|
|
return urlunsplit((self.scheme, self.bucket, self.path, "", ""))
|
|
return self.url
|