From f8fc953530cebb981274602213776b91deb3167a Mon Sep 17 00:00:00 2001 From: yo Date: Thu, 24 Dec 2020 16:51:03 +0100 Subject: [PATCH] BUGFIX : dont insert sudo if already there (was having duplicates at 2nd run) --- control.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/control.py b/control.py index 2fc48a2..22eab07 100644 --- a/control.py +++ b/control.py @@ -83,7 +83,8 @@ class QueueControl(object): :ref:`pymailq-configuration` """ cmd = CONFIG['commands'][operation + '_message'] - if CONFIG['commands']['use_sudo']: + # Dont duplicate sudo + if CONFIG['commands']['use_sudo'] and cmd[0] != 'sudo': cmd.insert(0, 'sudo') return cmd