Revert "Fixes a bug with issubclass() being called on an instance"
This reverts commite3d772050f
. "formatters" argument in get_dict_properties() and get_item_properties() expects a class of FormattableColumn instead of its instance. commite3d772050f
replaced issubclass() with isinstance() unexpectedly. As a result, osc-lib 1.11.0 breaks existing OSC plugin (at least neutronclient OSC plugin). Story: 2003133 Task: 23255 Change-Id: Ie10063197f02679e987e87cb4852f5230a02f76d
This commit is contained in:
parent
049a006f15
commit
46e2fb0a58
@ -430,7 +430,7 @@ def get_dict_properties(item, fields, mixed_case_fields=None, formatters=None):
|
||||
data = item[field_name] if field_name in item else ''
|
||||
if field in formatters:
|
||||
formatter = formatters[field]
|
||||
if isinstance(formatter, cliff_columns.FormattableColumn):
|
||||
if issubclass(formatter, cliff_columns.FormattableColumn):
|
||||
data = formatter(data)
|
||||
else:
|
||||
warnings.warn(
|
||||
|
Loading…
Reference in New Issue
Block a user