Rev1884, Fix mute plugin startup error
This commit is contained in:
parent
91cba2514a
commit
6b900ab0b1
2 changed files with 6 additions and 3 deletions
|
@ -10,9 +10,12 @@ from util import helper
|
|||
|
||||
|
||||
if os.path.isfile("%s/mutes.json" % config.data_dir):
|
||||
mutes = json.load(open("%s/mutes.json" % config.data_dir))["mutes"]
|
||||
try:
|
||||
mutes = json.load(open("%s/mutes.json" % config.data_dir))["mutes"]
|
||||
except Exception, err:
|
||||
mutes = {}
|
||||
else:
|
||||
open("%s/mutes.json" % config.data_dir, "w").write("{'mutes': {}}")
|
||||
open("%s/mutes.json" % config.data_dir, "w").write('{"mutes": {}}')
|
||||
mutes = {}
|
||||
|
||||
if "_" not in locals():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue