fix template builder and watcher
This commit is contained in:
parent
c68e256cf3
commit
ff0defe028
|
@ -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']
|
||||
|
|
Loading…
Reference in a new issue