mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Handle libcloud objects that throw RepresenterErrors with --out=yaml
Fixes #42152
This commit is contained in:
parent
e2aa5114e4
commit
f032223843
1 changed files with 3 additions and 3 deletions
|
@ -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…
Add table
Reference in a new issue