| Conditions | 8 |
| Total Lines | 17 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # -*- coding: utf-8 -*- |
||
| 17 | @staticmethod |
||
| 18 | def parse_data(data, topic): |
||
| 19 | if not data.get(topic): |
||
| 20 | return "" |
||
| 21 | msg = "" |
||
| 22 | for key, value in data.get(topic).items(): |
||
| 23 | if key == "content": |
||
| 24 | for i in value: |
||
| 25 | msg += str(i) |
||
| 26 | msg += "\n" |
||
| 27 | elif ( |
||
| 28 | value |
||
| 29 | and type(value) is not bool |
||
| 30 | and not bool(re.search("[a-z]", str(value))) |
||
| 31 | ): |
||
| 32 | msg += str(value) + "\n" |
||
| 33 | return msg |
||
| 34 | |||
| 63 |