From b804c9338e000c2b37d2b26e553df9bfa930a6d3 Mon Sep 17 00:00:00 2001 From: Psychokiller1888 Date: Sun, 25 Oct 2020 05:47:57 +0100 Subject: [PATCH] :bug: couple of fixes --- ProjectAliceSK/create/create.py | 6 ++++++ ProjectAliceSK/create/templates/widget.py.j2 | 3 ++- setup.py | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ProjectAliceSK/create/create.py b/ProjectAliceSK/create/create.py index 1e1db6b..846c3b4 100644 --- a/ProjectAliceSK/create/create.py +++ b/ProjectAliceSK/create/create.py @@ -456,6 +456,9 @@ def createWidgets(self): def makeWidgets(self, skillWidgets: list): + if not skillWidgets: + return + print('Creating widgets base directories') self.createDirectories([ 'widgets/css', @@ -514,6 +517,9 @@ def createScenarioNodes(self): def makeScenarioNodes(self, skillNodes: list): + if not skillNodes: + return + print('Creating scenario nodes base directories') self.createDirectories([f'scenarioNodes/locales/{lang}' for lang in self._general['langs']]) diff --git a/ProjectAliceSK/create/templates/widget.py.j2 b/ProjectAliceSK/create/templates/widget.py.j2 index e67dd6a..4893ef5 100644 --- a/ProjectAliceSK/create/templates/widget.py.j2 +++ b/ProjectAliceSK/create/templates/widget.py.j2 @@ -1,10 +1,11 @@ import sqlite3 from core.base.model.Widget import Widget +from core.base.model.Widget import WidgetSizes class {{ widget }}(Widget): - SIZE = 'w_small' + SIZE = WidgetSizes.w_small OPTIONS = dict() def __init__(self, data: sqlite3.Row): diff --git a/setup.py b/setup.py index 12adf96..a7e8f63 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name='projectalice-sk', author='ProjectAlice', - version='1.9.3', + version='1.9.4', maintainer='Psychokiller1888', maintainer_email='laurentchervet@bluewin.ch', description='Project Alice skill kit',