commit | ce9cae64d1e4b0a2e5e33ec6d88b7f975b02e831 | [log] [tgz] |
---|---|---|
author | Filip Pytloun <filip@pytloun.cz> | Sun Dec 03 15:42:25 2017 +0100 |
committer | Filip Pytloun <filip@pytloun.cz> | Sun Dec 03 15:42:53 2017 +0100 |
tree | f740a2de029778cb3897185dd1f7087c2a135999 | |
parent | 184ee1c71478188994a4c032b21ac10a2962abf4 [diff] |
Fix handling exception when job does not exist
diff --git a/_states/jenkins_job.py b/_states/jenkins_job.py index dccac86..e93bcbb 100644 --- a/_states/jenkins_job.py +++ b/_states/jenkins_job.py
@@ -70,8 +70,8 @@ _job_exists = True try: _current_job_config = __salt__['jenkins.get_job_config'](name) - except salt.exceptions.SaltInvocationError as e: - if 'does not exists.' in str(e): + except Exception as e: + if 'does not exist' in str(e): _job_exists = False else: raise e