Fix save calls
This commit is contained in:
parent
9119a7b511
commit
b1020589e2
10
threshold
10
threshold
|
@ -467,14 +467,14 @@ class Helper(object):
|
||||||
if i in keyword or keyword in i:
|
if i in keyword or keyword in i:
|
||||||
return "ISIN"
|
return "ISIN"
|
||||||
keyconf["Keywords"].append(keyword)
|
keyconf["Keywords"].append(keyword)
|
||||||
self.save("keyconf")()
|
self.save("keyconf")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def delKeyword(self, keyword):
|
def delKeyword(self, keyword):
|
||||||
if not keyword in keyconf["Keywords"]:
|
if not keyword in keyconf["Keywords"]:
|
||||||
return "NOKEY"
|
return "NOKEY"
|
||||||
keyconf["Keywords"].remove(keyword)
|
keyconf["Keywords"].remove(keyword)
|
||||||
self.save("keyconf")()
|
self.save("keyconf")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def parseCommand(self, addr, authed, data):
|
def parseCommand(self, addr, authed, data):
|
||||||
|
@ -755,7 +755,7 @@ class Helper(object):
|
||||||
keyconf["KeywordsExcept"][spl[2]] = []
|
keyconf["KeywordsExcept"][spl[2]] = []
|
||||||
|
|
||||||
keyconf["KeywordsExcept"][spl[2]].append(spl[3])
|
keyconf["KeywordsExcept"][spl[2]].append(spl[3])
|
||||||
self.save("keyconf")()
|
self.save("keyconf")
|
||||||
success("Successfully added exception %s for keyword %s" % (spl[3], spl[2]))
|
success("Successfully added exception %s for keyword %s" % (spl[3], spl[2]))
|
||||||
return
|
return
|
||||||
elif spl[1] == "master":
|
elif spl[1] == "master":
|
||||||
|
@ -779,7 +779,7 @@ class Helper(object):
|
||||||
keyconf["KeywordsExcept"][spl[2]].remove(spl[3])
|
keyconf["KeywordsExcept"][spl[2]].remove(spl[3])
|
||||||
if keyconf["KeywordsExcept"][spl[2]] == []:
|
if keyconf["KeywordsExcept"][spl[2]] == []:
|
||||||
del keyconf["KeywordsExcept"][spl[2]]
|
del keyconf["KeywordsExcept"][spl[2]]
|
||||||
self.save("keyconf")()
|
self.save("keyconf")
|
||||||
success("Successfully removed exception %s for keyword %s" % (spl[3], spl[2]))
|
success("Successfully removed exception %s for keyword %s" % (spl[3], spl[2]))
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
|
@ -791,7 +791,7 @@ class Helper(object):
|
||||||
failure("No such exception: %s" % spl[2])
|
failure("No such exception: %s" % spl[2])
|
||||||
return
|
return
|
||||||
del keyconf["KeywordsExcept"][spl[2]]
|
del keyconf["KeywordsExcept"][spl[2]]
|
||||||
self.save("keyconf")()
|
self.save("keyconf")
|
||||||
success("Successfully removed exception list of %s" % spl[2])
|
success("Successfully removed exception list of %s" % spl[2])
|
||||||
return
|
return
|
||||||
elif spl[1] == "monitor":
|
elif spl[1] == "monitor":
|
||||||
|
|
Loading…
Reference in New Issue