diff --git a/novaclient/client.py b/novaclient/client.py index de85905ab..003815245 100644 --- a/novaclient/client.py +++ b/novaclient/client.py @@ -595,9 +595,9 @@ class HTTPClient(object): def _save_keys(self): # Store the token/mgmt url in the keyring for later requests. - if (self.keyring_saver and self.os_cache and not self.keyring_saved - and self.auth_token and self.management_url - and self.tenant_id): + if (self.keyring_saver and self.os_cache and not self.keyring_saved and + self.auth_token and self.management_url and + self.tenant_id): self.keyring_saver.save(self.auth_token, self.management_url, self.tenant_id) diff --git a/novaclient/tests/unit/v2/fakes.py b/novaclient/tests/unit/v2/fakes.py index 69612c30d..3da50491e 100644 --- a/novaclient/tests/unit/v2/fakes.py +++ b/novaclient/tests/unit/v2/fakes.py @@ -137,8 +137,8 @@ class FakeHTTPClient(base_client.HTTPClient): def get_endpoint(self): # check if endpoint matches expected format (eg, v2.1) - if (hasattr(self, 'endpoint_type') - and ENDPOINT_TYPE_RE.search(self.endpoint_type)): + if (hasattr(self, 'endpoint_type') and + ENDPOINT_TYPE_RE.search(self.endpoint_type)): return "http://nova-api:8774/%s/" % self.endpoint_type else: return (