From 463b2d044953e7e5cc2cc374ca21a7eeab1e2f3b Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Fri, 12 May 2023 15:41:00 +0200 Subject: [PATCH] BrowserSteps - adding setup check --- changedetectionio/blueprint/browser_steps/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/changedetectionio/blueprint/browser_steps/__init__.py b/changedetectionio/blueprint/browser_steps/__init__.py index d2039800..931d8bbd 100644 --- a/changedetectionio/blueprint/browser_steps/__init__.py +++ b/changedetectionio/blueprint/browser_steps/__init__.py @@ -104,11 +104,14 @@ def construct_blueprint(datastore: ChangeDetectionStore): # A new session was requested, return sessionID import uuid - browsersteps_session_id = str(uuid.uuid4()) - - watch_uuid = request.args.get('uuid') global browsersteps_sessions + browsersteps_session_id = str(uuid.uuid4()) + watch_uuid = request.args.get('uuid') + + if not watch_uuid: + return make_response('No Watch UUID specified', 500) + print("Starting connection with playwright") logging.debug("browser_steps.py connecting") browsersteps_sessions[browsersteps_session_id] = start_browsersteps_session(watch_uuid)