def main():
client_manifest_path = (
"/Library/Managed Installs/manifests/client_manifest.plist")
if os.path.exists(client_manifest_path):
client_manifest = plistlib.readPlist(client_manifest_path)
else:
client_manifest = {}
formatted_results = {
"plugin": "Catalogs",
"historical": False,
"data": {"Catalogs": "+".join(client_manifest.get("catalogs", []))}}
if os.path.exists(RESULTS_PATH):
plugin_results = plistlib.readPlist(RESULTS_PATH)
else:
plugin_results = []
plugin_results.append(formatted_results)
plistlib.writePlist(plugin_results, RESULTS_PATH)
评论列表
文章目录