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)
|
sleep(30)
|
||||||
|
|
||||||
_logger.debug("WebDAV connection OK!")
|
_logger.debug("WebDAV connection ok.")
|
||||||
|
|
||||||
elif _WEBDAV_CLIENT.check(""):
|
elif not _WEBDAV_CLIENT.check(""):
|
||||||
_logger.debug("WebDAV connection OK!")
|
|
||||||
|
|
||||||
else:
|
|
||||||
_logger.error(
|
_logger.error(
|
||||||
"WebDAV connection to %s FAILED!",
|
"WebDAV connection to %s FAILED!",
|
||||||
repr(SETTINGS.webdav.url),
|
repr(SETTINGS.webdav.url),
|
||||||
)
|
)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if _WEBDAV_CLIENT.check(SETTINGS.webdav_prefix):
|
_logger.debug("WebDAV connection ok.")
|
||||||
_logger.debug("WebDAV prefix directory FOUND!")
|
|
||||||
|
|
||||||
else:
|
if not _WEBDAV_CLIENT.check(SETTINGS.webdav_prefix):
|
||||||
_logger.error(
|
_logger.error(
|
||||||
"WebDAV prefix directory %s NOT FOUND, please create it!",
|
"WebDAV prefix directory %s NOT FOUND, please create it!",
|
||||||
repr(SETTINGS.webdav_prefix),
|
repr(SETTINGS.webdav_prefix),
|
||||||
)
|
)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
_logger.debug("WebDAV prefix directory found.")
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue