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):
|
for filename in listdir(src):
|
||||||
fullPath = f'{src}/{filename}'
|
fullPath = f'{src}/{filename}'
|
||||||
modtime = getmtime(fullPath)
|
modtime = getmtime(fullPath)
|
||||||
base, ext = filename.split('.')
|
base, ext = filename.split('.', 1)
|
||||||
|
|
||||||
if ext != 'haml':
|
if ext != 'haml':
|
||||||
pass
|
pass
|
||||||
|
@ -199,7 +199,7 @@ class templateWatchHandler(FileSystemEventHandler):
|
||||||
|
|
||||||
if event.event_type in ['modified', 'created'] and ext[1:] == 'haml':
|
if event.event_type in ['modified', 'created'] and ext[1:] == 'haml':
|
||||||
logging.info('Rebuilding templates')
|
logging.info('Rebuilding templates')
|
||||||
build_templates()
|
buildTemplates()
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['addSearchPath', 'delSearchPath', 'addBuildPath', 'delSearchPath', 'addEnv', 'delEnv', 'setup', 'renderTemplate', 'aiohttp', 'buildTemplates', 'templateWatcher']
|
__all__ = ['addSearchPath', 'delSearchPath', 'addBuildPath', 'delSearchPath', 'addEnv', 'delEnv', 'setup', 'renderTemplate', 'aiohttp', 'buildTemplates', 'templateWatcher']
|
||||||
|
|
Loading…
Reference in a new issue