Merge "Remove interpret_puppet_exitcodes"

This commit is contained in:
Jenkins 2016-03-11 13:36:53 +00:00 committed by Gerrit Code Review
commit 337e9749a3
1 changed files with 0 additions and 21 deletions

View File

@ -52,24 +52,3 @@ def ssh_connect(ip, username, connect_kwargs={}, timeout=60):
if "access okay" in out:
return client
return None
def interpret_puppet_exitcodes(rc, output):
if rc == 0:
# success
return
elif rc == 1:
# rc==1 could be because it's disabled
# rc==1 could also mean there was a compilation failure
disabled = "administratively disabled" in output
if disabled:
msg = "puppet is disabled"
else:
msg = "puppet did not run"
raise Exception(msg)
elif rc == 2:
# success with changes
return
elif rc == 124:
# timeout
raise Exception("Puppet timed out")