mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-11 06:00:59 -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 tempfile
|
||||
import aiml
|
||||
import untangle
|
||||
import xmltodict
|
||||
import json
|
||||
|
||||
from .Database import db as botdb
|
||||
from .Logs import logs
|
||||
|
||||
|
||||
|
||||
class SpiceBot_AI_MainSection(StaticSection):
|
||||
@ -96,12 +97,11 @@ class SpiceBot_AI():
|
||||
filereadgood = True
|
||||
|
||||
try:
|
||||
dict_from_file = untangle.parse(aimlfile)
|
||||
# logs.log('SpiceBot_AI', dict_from_file)
|
||||
with open(aimlfile) as fd:
|
||||
dict_from_file = xmltodict.parse(fd.read())
|
||||
except Exception as e:
|
||||
filereadgood = e
|
||||
filereadgood = False
|
||||
# logs.log('SpiceBot_AI', "Error loading %s: %s (%s)" % ('aiml', e, aimlfile))
|
||||
|
||||
if filereadgood:
|
||||
self.dict["counts"] += 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user