Added an option to disable check in case WebDAV server is not support it
This commit is contained in:
parent
64bbd967bc
commit
dc7d908462
3 changed files with 6 additions and 3 deletions
|
|
@ -274,11 +274,13 @@ class Client(object):
|
|||
:return: True if resource is exist or False otherwise
|
||||
"""
|
||||
|
||||
if not self.webdav.do_check:
|
||||
if self.webdav.disable_check:
|
||||
return True
|
||||
urn = Urn(remote_path)
|
||||
try:
|
||||
response = self.execute_request(action='check', path=urn.quote())
|
||||
except RemoteResourceNotFound:
|
||||
return False
|
||||
except ResponseErrorCode:
|
||||
return False
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class WebDAVSettings(ConnectionSettings):
|
|||
ns = "webdav:"
|
||||
prefix = "webdav_"
|
||||
keys = {'hostname', 'login', 'password', 'token', 'root', 'cert_path', 'key_path', 'recv_speed', 'send_speed',
|
||||
'verbose', 'do_check'}
|
||||
'verbose', 'disable_check'}
|
||||
|
||||
hostname = None
|
||||
login = None
|
||||
|
|
@ -34,7 +34,7 @@ class WebDAVSettings(ConnectionSettings):
|
|||
recv_speed = None
|
||||
send_speed = None
|
||||
verbose = None
|
||||
do_check = False
|
||||
disable_check = False
|
||||
|
||||
def __init__(self, options):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue