fix template builder and watcher

This commit is contained in:
Izalia Mae 2020-03-11 21:00:37 -04:00
parent c68e256cf3
commit ff0defe028

View file

@ -148,7 +148,7 @@ def buildTemplates(name=None):
for filename in listdir(src):
fullPath = f'{src}/{filename}'
modtime = getmtime(fullPath)
base, ext = filename.split('.')
base, ext = filename.split('.', 1)
if ext != 'haml':
pass
@ -199,7 +199,7 @@ class templateWatchHandler(FileSystemEventHandler):
if event.event_type in ['modified', 'created'] and ext[1:] == 'haml':
logging.info('Rebuilding templates')
build_templates()
buildTemplates()
__all__ = ['addSearchPath', 'delSearchPath', 'addBuildPath', 'delSearchPath', 'addEnv', 'delEnv', 'setup', 'renderTemplate', 'aiohttp', 'buildTemplates', 'templateWatcher']