snapshot: preserve reliability hardening and Workdock identity pass
This commit is contained in:
@@ -78,12 +78,16 @@ def _ensure_nextcloud_directory(base_url: str, directory: str, auth: tuple[str,
|
||||
current_parts: list[str] = []
|
||||
for part in [p for p in directory.split('/') if p]:
|
||||
current_parts.append(part)
|
||||
response = requests.request(
|
||||
'MKCOL',
|
||||
f"{base_url}/{'/'.join(current_parts)}",
|
||||
auth=auth,
|
||||
timeout=timeout,
|
||||
)
|
||||
try:
|
||||
response = requests.request(
|
||||
'MKCOL',
|
||||
f"{base_url}/{'/'.join(current_parts)}",
|
||||
auth=auth,
|
||||
timeout=timeout,
|
||||
)
|
||||
except requests.RequestException as exc:
|
||||
logger.warning('Nextcloud directory ensure error for %s: %s', '/'.join(current_parts), exc)
|
||||
return False
|
||||
if response.status_code in (201, 301, 405):
|
||||
continue
|
||||
logger.warning('Nextcloud directory ensure failed with status %s for %s', response.status_code, '/'.join(current_parts))
|
||||
|
||||
Reference in New Issue
Block a user