Return a dictionary containing information from the output of `msiinfo suminfo`
(output_string)
| 64 | |
| 65 | |
| 66 | def parse_msiinfo_suminfo_output(output_string): |
| 67 | """ |
| 68 | Return a dictionary containing information from the output of `msiinfo suminfo` |
| 69 | """ |
| 70 | # Split lines by newline and place lines into a list |
| 71 | output_list = output_string.splitlines() |
| 72 | results = {} |
| 73 | # Partition lines by the leftmost ":", use the string to the left of ":" as |
| 74 | # the key and use the string to the right of ":" as the value |
| 75 | for output in output_list: |
| 76 | key, _, value = output.partition(':') |
| 77 | if key: |
| 78 | results[key] = value.strip() |
| 79 | return results |
| 80 | |
| 81 | |
| 82 | def get_msi_info(location): |
no outgoing calls