From 49ab03e6a68fd5b02aaba213e7ab94468f6600ad Mon Sep 17 00:00:00 2001
From: Alan Pevec <apevec@redhat.com>
Date: Tue, 2 Apr 2013 12:16:37 +0200
Subject: [PATCH] do not ignore --os-cache

Change-Id: Ib8808da00967163faa9ce05e580605f4e499891d
---
 novaclient/shell.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/novaclient/shell.py b/novaclient/shell.py
index 8b4aea512..dd7ce8a5f 100644
--- a/novaclient/shell.py
+++ b/novaclient/shell.py
@@ -149,7 +149,7 @@ class SecretsHelper(object):
 
     @property
     def management_url(self):
-        if not HAS_KEYRING:
+        if not HAS_KEYRING or not self.args.os_cache:
             return None
         management_url = None
         try:
@@ -166,7 +166,7 @@ class SecretsHelper(object):
         # want to look into the keyring module, if it
         # exists and see if anything was provided in that
         # file that we can use.
-        if not HAS_KEYRING:
+        if not HAS_KEYRING or not self.args.os_cache:
             return None
         token = None
         try:
@@ -179,7 +179,7 @@ class SecretsHelper(object):
 
     @property
     def tenant_id(self):
-        if not HAS_KEYRING:
+        if not HAS_KEYRING or not self.args.os_cache:
             return None
         tenant_id = None
         try: