From 685335c338d10fb330b5a71c35bd9c577c965350 Mon Sep 17 00:00:00 2001 From: trbKnl Date: Thu, 11 Jan 2024 09:57:03 +0100 Subject: [PATCH] added exit to script --- src/framework/processing/py/port/script.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/framework/processing/py/port/script.py b/src/framework/processing/py/port/script.py index f095b7c2..ad12daf1 100644 --- a/src/framework/processing/py/port/script.py +++ b/src/framework/processing/py/port/script.py @@ -17,7 +17,7 @@ import port.instagram as instagram import port.linkedin as linkedin -from port.api.commands import (CommandSystemDonate, CommandUIRender) +from port.api.commands import (CommandSystemDonate, CommandUIRender, CommandSystemExit) LOG_STREAM = io.StringIO() @@ -119,6 +119,7 @@ def process(session_id): LOGGER.info("Skipped ater reviewing consent: %s", platform_name) yield donate_logs(f"{session_id}-tracking") + yield exit(0, "Success") yield render_end_page() @@ -602,3 +603,6 @@ def prompt_file(extensions, platform): def donate(key, json_string): return CommandSystemDonate(key, json_string) + +def exit(code, info): + return CommandSystemExit(code, info)