diff options
author | Philipp Hörist <philipp@hoerist.com> | 2022-12-30 00:53:07 +0300 |
---|---|---|
committer | Philipp Hörist <philipp@hoerist.com> | 2022-12-30 00:53:44 +0300 |
commit | 672cfcc7c467f0fa0377bd8b73c5eb389cc9fde4 (patch) | |
tree | 854c6618f78bdfd9df500d95cfe6bfab7da9e53e | |
parent | cc98a4f4f7a9831c662635a454ecf01dab50e7fa (diff) |
[triggers] Replace exec_command()
The method will be removed from Gajim
-rw-r--r-- | triggers/triggers.py | 4 |
1 files 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 |