From b9683f3e5befae04f3c9602416db85ba61b47e5e Mon Sep 17 00:00:00 2001 From: Kevin Morton Date: Wed, 22 Nov 2017 19:05:47 -0500 Subject: [PATCH] Fixed python script error when generating storyboard ID's --- Scripts/AmaroLib.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Scripts/AmaroLib.py b/Scripts/AmaroLib.py index 42cffd2..d441c85 100644 --- a/Scripts/AmaroLib.py +++ b/Scripts/AmaroLib.py @@ -295,7 +295,11 @@ def variableNameForString(self, id_, prefixesToStrip = None, suffixesToStrip = N if lower: result = self.smartLowerCase(result) - + + if len(result) < 1: + print('variableNameForString result is too short. Returning id {}'.format(self.smartLowerCase(id_))) + return self.smartLowerCase(id_) + return result def smartLowerCase(self, s): @@ -304,7 +308,7 @@ def smartLowerCase(self, s): if len(s) > 2 and s[1].isupper(): return s - return s[0].lower() + s[1:] + return s[:1].lower() + s[1:] def die(self, message): print('error: ' + message, file = sys.stderr)