From ff0defe0289521a3c2bdba1aafb140ffc695f55c Mon Sep 17 00:00:00 2001 From: Izalia Mae Date: Wed, 11 Mar 2020 21:00:37 -0400 Subject: [PATCH] fix template builder and watcher --- IzzyLib/template.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IzzyLib/template.py b/IzzyLib/template.py index f8c1965..92652c5 100644 --- a/IzzyLib/template.py +++ b/IzzyLib/template.py @@ -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']