mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Merge pull request #42282 from rallytime/fix-42152
Handle libcloud objects that throw RepresenterErrors with --out=yaml
This commit is contained in:
commit
5aaa214a75
@ -150,7 +150,7 @@ def avail_locations(conn=None, call=None):
|
||||
|
||||
ret[img_name] = {}
|
||||
for attr in dir(img):
|
||||
if attr.startswith('_'):
|
||||
if attr.startswith('_') or attr == 'driver':
|
||||
continue
|
||||
|
||||
attr_value = getattr(img, attr)
|
||||
@ -187,7 +187,7 @@ def avail_images(conn=None, call=None):
|
||||
|
||||
ret[img_name] = {}
|
||||
for attr in dir(img):
|
||||
if attr.startswith('_'):
|
||||
if attr.startswith('_') or attr in ('driver', 'get_uuid'):
|
||||
continue
|
||||
attr_value = getattr(img, attr)
|
||||
if isinstance(attr_value, string_types) and not six.PY3:
|
||||
@ -222,7 +222,7 @@ def avail_sizes(conn=None, call=None):
|
||||
|
||||
ret[size_name] = {}
|
||||
for attr in dir(size):
|
||||
if attr.startswith('_'):
|
||||
if attr.startswith('_') or attr in ('driver', 'get_uuid'):
|
||||
continue
|
||||
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user