hotfix for rollback

This commit is contained in:
Twentysix 2016-02-28 18:54:58 +01:00
parent b1511984ec
commit 2e47ffa029

9
red.py
View File

@ -389,6 +389,15 @@ def check_configs():
with open(settings_path, "w") as f:
f.write(json.dumps(settings))
else: # Undoing the changes made by the broken pull request
data = load_settings()
if "default" in data:
data["ADMIN_ROLE"] = data["default"]["ADMIN_ROLE"]
data["MOD_ROLE"] = data["default"]["MOD_ROLE"]
del data["default"]
print("Rolling back settings to previous format...")
with open(settings_path, "w") as f:
f.write(json.dumps(data, indent=4,sort_keys=True,separators=(',',' : ')))
cogs_s_path = "data/red/cogs.json"
cogs = {}