Skip to content

Instantly share code, notes, and snippets.

@DargonLee
Created March 21, 2023 08:55
Show Gist options
  • Save DargonLee/41b192f2ee8ae98b40f83cfc8f8dd629 to your computer and use it in GitHub Desktop.
Save DargonLee/41b192f2ee8ae98b40f83cfc8f8dd629 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
g_build_sdp = "YES"
with open("config.json", "r+") as jsonFile:
data = json.load(jsonFile)
if g_build_sdp == "YES":
data["file-plugin"][1]["force"] = "true"
jsonFile.seek(0) # rewind
json.dump(data, jsonFile, ensure_ascii=False)
jsonFile.truncate()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment