BUGFIX : dont insert sudo if already there (was having duplicates at 2nd run)
This commit is contained in:
parent
9966b7653c
commit
f8fc953530
@ -83,7 +83,8 @@ class QueueControl(object):
|
|||||||
:ref:`pymailq-configuration`
|
:ref:`pymailq-configuration`
|
||||||
"""
|
"""
|
||||||
cmd = CONFIG['commands'][operation + '_message']
|
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')
|
cmd.insert(0, 'sudo')
|
||||||
return cmd
|
return cmd
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user