mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-12 22:49:53 -05:00
test
This commit is contained in:
parent
54916bdae7
commit
644fe28e3c
@ -10,7 +10,7 @@ from sopel.config.types import StaticSection, ListAttribute
|
|||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
import aiml
|
import aiml
|
||||||
import xmltodict
|
from xml.etree import ElementTree
|
||||||
|
|
||||||
from .Database import db as botdb
|
from .Database import db as botdb
|
||||||
|
|
||||||
@ -93,6 +93,11 @@ class SpiceBot_AI():
|
|||||||
|
|
||||||
for aimlfile in filepathlist:
|
for aimlfile in filepathlist:
|
||||||
filereadgood = True
|
filereadgood = True
|
||||||
|
tree = ElementTree.parse(aimlfile)
|
||||||
|
root = tree.getroot()
|
||||||
|
if aimlfile not in self.dict["files"]:
|
||||||
|
self.dict["files"][aimlfile] = root
|
||||||
|
return
|
||||||
aiml_file_lines = []
|
aiml_file_lines = []
|
||||||
aiml_file = open(aimlfile, 'r')
|
aiml_file = open(aimlfile, 'r')
|
||||||
lines = aiml_file.readlines()
|
lines = aiml_file.readlines()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user