webdav_check logic reversal
This commit is contained in:
parent
bd1d527d0e
commit
a02198dec0
1 changed files with 6 additions and 8 deletions
|
@ -45,28 +45,26 @@ def webdav_check() -> bool:
|
|||
)
|
||||
sleep(30)
|
||||
|
||||
_logger.debug("WebDAV connection OK!")
|
||||
_logger.debug("WebDAV connection ok.")
|
||||
|
||||
elif _WEBDAV_CLIENT.check(""):
|
||||
_logger.debug("WebDAV connection OK!")
|
||||
|
||||
else:
|
||||
elif not _WEBDAV_CLIENT.check(""):
|
||||
_logger.error(
|
||||
"WebDAV connection to %s FAILED!",
|
||||
repr(SETTINGS.webdav.url),
|
||||
)
|
||||
return False
|
||||
|
||||
if _WEBDAV_CLIENT.check(SETTINGS.webdav_prefix):
|
||||
_logger.debug("WebDAV prefix directory FOUND!")
|
||||
_logger.debug("WebDAV connection ok.")
|
||||
|
||||
else:
|
||||
if not _WEBDAV_CLIENT.check(SETTINGS.webdav_prefix):
|
||||
_logger.error(
|
||||
"WebDAV prefix directory %s NOT FOUND, please create it!",
|
||||
repr(SETTINGS.webdav_prefix),
|
||||
)
|
||||
return False
|
||||
|
||||
_logger.debug("WebDAV prefix directory found.")
|
||||
|
||||
return True
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue