mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -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 tempfile
|
||||
import aiml
|
||||
import xmltodict
|
||||
from xml.etree import ElementTree
|
||||
|
||||
from .Database import db as botdb
|
||||
|
||||
@ -93,6 +93,11 @@ class SpiceBot_AI():
|
||||
|
||||
for aimlfile in filepathlist:
|
||||
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 = open(aimlfile, 'r')
|
||||
lines = aiml_file.readlines()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user