From 672cfcc7c467f0fa0377bd8b73c5eb389cc9fde4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Thu, 29 Dec 2022 22:53:07 +0100 Subject: [PATCH] [triggers] Replace exec_command() The method will be removed from Gajim --- triggers/triggers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/triggers/triggers.py b/triggers/triggers.py index 8cafe1f..caca12e 100644 --- a/triggers/triggers.py +++ b/triggers/triggers.py @@ -24,6 +24,7 @@ from typing import Union import logging from functools import partial +import subprocess from nbxmpp.protocol import JID @@ -35,7 +36,6 @@ from gajim.common.events import Notification from gajim.common.events import GcMessageReceived from gajim.common.events import MessageReceived from gajim.common.events import PresenceReceived -from gajim.common.helpers import exec_command from gajim.common.helpers import play_sound_file from gajim.plugins import GajimPlugin @@ -330,7 +330,7 @@ class Triggers(GajimPlugin): if result.command is not None: try: - exec_command(result.command, use_shell=True) + subprocess.Popen(f'{result.command} &', shell=True).wait() except Exception: pass