catalogs.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:sheagcraig_sal_plugins 作者: sheagcraig 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号