Merge "Print to stderr when keyring module is missing."
This commit is contained in:
@@ -10,6 +10,7 @@ OpenStack Client interface. Handles the REST calls and responses.
|
|||||||
|
|
||||||
import copy
|
import copy
|
||||||
import logging
|
import logging
|
||||||
|
import sys
|
||||||
import urlparse
|
import urlparse
|
||||||
|
|
||||||
import httplib2
|
import httplib2
|
||||||
@@ -38,6 +39,9 @@ try:
|
|||||||
import keyring
|
import keyring
|
||||||
import pickle
|
import pickle
|
||||||
except ImportError:
|
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.')
|
_logger.warning('Failed to load keyring modules.')
|
||||||
keyring_available = False
|
keyring_available = False
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user