MCPcopy Create free account
hub / github.com/StackStorm/st2 / format_log_items

Function format_log_items

st2client/st2client/commands/action.py:110–128  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

108
109
110def format_log_items(value):
111 if not value:
112 return value
113
114 if not isinstance(value, dict):
115 # Already formatted or similar
116 return value
117
118 result = []
119 for item in value:
120 if not isinstance(item, dict):
121 # We could end up here if user runs newer versions of the client against old st2
122 # instance. We simply ignore those errors.
123 continue
124
125 item["timestamp"] = format_isodate_for_user_timezone(item["timestamp"])
126 result.append(item)
127
128 return result
129
130
131# String for indenting etc.

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected