Skip to content

Commit

Permalink
stateengine plugin: fix previously introduced issue logging problem
Browse files Browse the repository at this point in the history
  • Loading branch information
onkelandy committed Sep 22, 2024
1 parent 4996381 commit 8d1ff2f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stateengine/StateEngineItem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@ def list_issues(v):
self.__logger.info("has the following issues:")
self.__logger.increase_indent()
for i, e in enumerate(_issuelist):
_attr = "" if _attrlist is None or not _attrlist[i] else "attribute {}: ".format(_attrlist[i])
_attr = "" if _attrlist is None or not isinstance(_attrlist, list) or not _attrlist[i] else "attribute {}: ".format(_attrlist[i])
if isinstance(e, dict):
print_readable_dict(_attr, e)
else:
Expand All @@ -1214,11 +1214,11 @@ def list_issues(v):
if isinstance(_issuelist[0], dict):
self.__logger.info("has the following issues:")
self.__logger.increase_indent()
_attr = "" if _attrlist is None or not _attrlist[0] else "attribute {}: ".format(_attrlist[0])
_attr = "" if _attrlist is None or not isinstance(_attrlist, list) or not _attrlist[0] else "attribute {}: ".format(_attrlist[0])
print_readable_dict(_attr, _issuelist[0])
self.__logger.decrease_indent()
else:
_attr = "" if _attrlist is None or not _attrlist[0] else " for attribute {}".format(_attrlist[0])
_attr = "" if _attrlist is None or not isinstance(_attrlist, list) or not _attrlist[0] else " for attribute {}".format(_attrlist[0])
self.__logger.info("has the following issue{}: {}", _attr, _issuelist[0])
else:
if isinstance(_issuelist, dict):
Expand Down

0 comments on commit 8d1ff2f

Please sign in to comment.