Fixing pep8 issues and handling invalid response code

Change-Id: I0dcef8dc4c6c41d4304b165ecc84133615ccabeb
Merge branch 'cloudkeep_working_secrets' into cloudkeep_jenkins