Merge "Print to stderr when keyring module is missing."

This commit is contained in:
Jenkins
2012-12-20 17:17:42 +00:00
committed by Gerrit Code Review

View File

@@ -10,6 +10,7 @@ OpenStack Client interface. Handles the REST calls and responses.
import copy
import logging
import sys
import urlparse
import httplib2
@@ -38,6 +39,9 @@ try:
import keyring
import pickle
except ImportError:
if (hasattr(sys.stderr, 'isatty') and sys.stderr.isatty()):
print >> sys.stderr, 'Failed to load keyring modules.'
else:
_logger.warning('Failed to load keyring modules.')
keyring_available = False