summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/shell.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/openstackclient/shell.py b/openstackclient/shell.py
index c84e2b1d..137446ef 100644
--- a/openstackclient/shell.py
+++ b/openstackclient/shell.py
@@ -234,12 +234,17 @@ class OpenStackShell(app.App):
# Do configuration file handling
# Ignore the default value of interface. Only if it is set later
# will it be used.
- cc = cloud_config.OpenStackConfig(
- override_defaults={
- 'interface': None,
- 'auth_type': auth_type,
+ try:
+ cc = cloud_config.OpenStackConfig(
+ override_defaults={
+ 'interface': None,
+ 'auth_type': auth_type,
},
)
+ except (IOError, OSError) as e:
+ self.log.critical("Could not read clouds.yaml configuration file")
+ self.print_help_if_requested()
+ raise e
# TODO(thowe): Change cliff so the default value for debug
# can be set to None.