Merge pull request #21 from jakubjosef/master
Fixed jenkins credential params string generating.
diff --git a/_states/jenkins_credential.py b/_states/jenkins_credential.py
index 42b6cd0..df1da83 100644
--- a/_states/jenkins_credential.py
+++ b/_states/jenkins_credential.py
@@ -86,7 +86,7 @@
else:
clazz = "com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl"
params = 'CredentialsScope.{}, "{}", "{}", "{}", "{}"'.format(
- scope, name, desc, username, password)
+ scope, name, desc if desc else "", username, password)
call_result = __salt__['jenkins_common.call_groovy_script'](
create_credential_groovy, {"name": name, "username": username, "password": password if password else "", "clazz": clazz, "params": params, "key": key if key else "", "desc": desc if desc else ""})