Merge "Add check Identity validate when get schemas"
This commit is contained in:
@@ -575,6 +575,9 @@ class OpenStackImagesShell(object):
|
|||||||
schema = client.schemas.get(resource)
|
schema = client.schemas.get(resource)
|
||||||
with open(schema_file_path, 'w') as f:
|
with open(schema_file_path, 'w') as f:
|
||||||
f.write(json.dumps(schema.raw()))
|
f.write(json.dumps(schema.raw()))
|
||||||
|
except exc.Unauthorized:
|
||||||
|
raise exc.CommandError(
|
||||||
|
"Invalid OpenStack Identity credentials.")
|
||||||
except Exception:
|
except Exception:
|
||||||
# NOTE(esheffield) do nothing here, we'll get a message
|
# NOTE(esheffield) do nothing here, we'll get a message
|
||||||
# later if the schema is missing
|
# later if the schema is missing
|
||||||
|
|||||||
Reference in New Issue
Block a user