MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / parse_msiinfo_suminfo_output

Function parse_msiinfo_suminfo_output

src/packagedcode/msi.py:66–79  ·  view source on GitHub ↗

Return a dictionary containing information from the output of `msiinfo suminfo`

(output_string)

Source from the content-addressed store, hash-verified

64
65
66def 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
82def get_msi_info(location):

Callers 2

get_msi_infoFunction · 0.85

Calls

no outgoing calls

Tested by 1