mirror of
https://github.com/epitaxy/log-watcher.git
synced 2025-10-13 17:51:14 +09:00
string_2_dict was added
This commit is contained in:
5
base.py
5
base.py
@@ -9,3 +9,8 @@ state, time = list( zip( *map(itemgetter('state', 'last_updated'), raw_data) ))
|
|||||||
|
|
||||||
# each
|
# each
|
||||||
state = list(map(itemgetter('state'), raw_data))
|
state = list(map(itemgetter('state'), raw_data))
|
||||||
|
|
||||||
|
|
||||||
|
def string_to_dict(string_as_dict):
|
||||||
|
from ast import literal_eval
|
||||||
|
return literal_eval(string_as_dict)
|
||||||
Reference in New Issue
Block a user