Skip to content

Commit

Permalink
tree,remote: WebDAV is written with capitalized 'DAV'...
Browse files Browse the repository at this point in the history
  • Loading branch information
iksnagreb committed Jul 27, 2020
1 parent 5c65291 commit 73b5fbe
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dvc/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def __init__(self, code, reason):
super().__init__(f"'{code} {reason}'")


class WebdavConfigError(DvcException):
class WebDAVConfigError(DvcException):
def __init__(self, host):
super().__init__(f"Configuration for WebDAV {host} is invalid.")

Expand Down
2 changes: 1 addition & 1 deletion dvc/path_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def __eq__(self, other):


# See https://github.com/shizacat/dvc/blob/remote-webdav/dvc/path_info.py
class WebdavURLInfo(HTTPURLInfo):
class WebDAVURLInfo(HTTPURLInfo):
@cached_property
def url(self):
return "{}://{}{}{}{}{}".format(
Expand Down
8 changes: 4 additions & 4 deletions dvc/tree/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
from .oss import OSSTree
from .s3 import S3Tree
from .ssh import SSHTree
from .webdav import WebdavTree
from .webdavs import WebdavsTree
from .webdav import WebDAVTree
from .webdavs import WebDAVSTree

TREES = [
AzureTree,
Expand All @@ -24,8 +24,8 @@
S3Tree,
SSHTree,
OSSTree,
WebdavTree,
WebdavsTree,
WebDAVTree,
WebDAVSTree,
# NOTE: LocalTree is the default
]

Expand Down
10 changes: 5 additions & 5 deletions dvc/tree/webdav.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

from funcy import cached_property, wrap_prop

from dvc.exceptions import DvcException, WebdavConfigError
from dvc.path_info import WebdavURLInfo
from dvc.exceptions import DvcException, WebDAVConfigError
from dvc.path_info import WebDAVURLInfo
from dvc.scheme import Schemes

from .base import BaseTree
Expand All @@ -13,12 +13,12 @@
logger = logging.getLogger(__name__)


class WebdavTree(BaseTree): # pylint:disable=abstract-method
class WebDAVTree(BaseTree): # pylint:disable=abstract-method
# Use webdav scheme
scheme = Schemes.WEBDAV

# URLInfo for Webdav ~ replaces webdav -> http
PATH_CLS = WebdavURLInfo
PATH_CLS = WebDAVURLInfo

# Non traversable as walk_files is not implemented
CAN_TRAVERSE = False
Expand Down Expand Up @@ -108,7 +108,7 @@ def _client(self):

# Check whether client options are valid
if not client.valid():
raise WebdavConfigError(hostname)
raise WebDAVConfigError(hostname)

# Return constructed client (cached)
return client
Expand Down
4 changes: 2 additions & 2 deletions dvc/tree/webdavs.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from dvc.scheme import Schemes

from .webdav import WebdavTree
from .webdav import WebDAVTree


class WebdavsTree(WebdavTree): # pylint:disable=abstract-method
class WebDAVSTree(WebDAVTree): # pylint:disable=abstract-method
scheme = Schemes.WEBDAVS

0 comments on commit 73b5fbe

Please sign in to comment.