mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-12 22:49:53 -05:00
test
This commit is contained in:
parent
8563cb1198
commit
9508f3b18b
@ -10,10 +10,11 @@ from sopel.config.types import StaticSection, ListAttribute
|
|||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
import aiml
|
import aiml
|
||||||
import untangle
|
import xmltodict
|
||||||
|
import json
|
||||||
|
|
||||||
from .Database import db as botdb
|
from .Database import db as botdb
|
||||||
from .Logs import logs
|
|
||||||
|
|
||||||
|
|
||||||
class SpiceBot_AI_MainSection(StaticSection):
|
class SpiceBot_AI_MainSection(StaticSection):
|
||||||
@ -96,12 +97,11 @@ class SpiceBot_AI():
|
|||||||
filereadgood = True
|
filereadgood = True
|
||||||
|
|
||||||
try:
|
try:
|
||||||
dict_from_file = untangle.parse(aimlfile)
|
with open(aimlfile) as fd:
|
||||||
# logs.log('SpiceBot_AI', dict_from_file)
|
dict_from_file = xmltodict.parse(fd.read())
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
filereadgood = e
|
filereadgood = e
|
||||||
filereadgood = False
|
filereadgood = False
|
||||||
# logs.log('SpiceBot_AI', "Error loading %s: %s (%s)" % ('aiml', e, aimlfile))
|
|
||||||
|
|
||||||
if filereadgood:
|
if filereadgood:
|
||||||
self.dict["counts"] += 1
|
self.dict["counts"] += 1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user