Update jenkins.py

This commit is contained in:
garethgreenaway 2017-08-17 15:22:31 -07:00 committed by GitHub
parent fc306fc8c3
commit 33fd8ff939

View file

@ -15,7 +15,7 @@ import logging
# Import Salt libs
import salt.ext.six as six
import salt.utils
from salt.exceptions import CommandExecutionError, SaltInvocationError
from salt.exceptions import CommandExecutionError
log = logging.getLogger(__name__)
@ -44,7 +44,6 @@ def present(name,
'changes': {},
'comment': ['Job {0} is up to date.'.format(name)]}
if __salt__['jenkins.job_exists'](name):
_current_job_config = __salt__['jenkins.get_job_config'](name)
buf = six.moves.StringIO(_current_job_config)
@ -98,7 +97,6 @@ def absent(name,
'changes': {},
'comment': []}
if __salt__['jenkins.job_exists'](name):
try:
__salt__['jenkins.delete_job'](name)