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