0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-06-16 00:04:48 +02:00

Fixed for Nextcloud 27.0.*

This commit is contained in:
Arne Tarara 2023-10-02 14:55:05 +02:00
parent 6e3ddc458a
commit 2848d535bf
No known key found for this signature in database
GPG key ID: 2540198A4079785B
6 changed files with 32 additions and 24 deletions

View file

@ -2,7 +2,7 @@ import sys
import contextlib
from time import time_ns
from playwright.sync_api import Playwright, sync_playwright, Error
from playwright.sync_api import Playwright, sync_playwright
def log_note(message: str) -> None:
timestamp = str(time_ns())[:16]
@ -44,8 +44,9 @@ def create_user(playwright: Playwright, browser_name: str, username: str, passwo
page.close()
context.close()
browser.close()
except Error as e:
log_note(f"Exception occurred: {e.message}")
except Exception as e:
if hasattr(e, 'message'): # only Playwright error class has this member
log_note(f"Exception occurred: {e.message}")
log_note(f"Page content was: {page.content()}")
raise e