Rev1884, Fix mute plugin startup error

This commit is contained in:
shortcutme 2017-02-10 00:40:32 +01:00
parent 91cba2514a
commit 6b900ab0b1
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 6 additions and 3 deletions

View file

@ -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():

View file

@ -10,7 +10,7 @@ class Config(object):
def __init__(self, argv):
self.version = "0.5.2"
self.rev = 1882
self.rev = 1884
self.argv = argv
self.action = None
self.config_file = "zeronet.conf"