summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser/toscaparser/elements/tosca_type_validation.py
diff options
context:
space:
mode:
authorLianhao Lu <lianhao.lu@intel.com>2018-11-19 16:28:05 +0800
committerLianhao Lu <lianhao.lu@intel.com>2018-11-28 12:36:45 +0800
commitfa91717ecc519f5ca5b26456a7f7ab3c77c253ce (patch)
treee9fdc1be9566b30df1c07f78ec84a2922db1111c /tosca2heat/tosca-parser/toscaparser/elements/tosca_type_validation.py
parent26fc7a76a06c83eae2a75a262953b3d8d9bb00b3 (diff)
toscaparser: Avoid exception when creating our own
Fixed the bug that new exception is thrown when we're creating our own exceptions. JIRA: PARSER-187 Change-Id: If4c445eb9b5c6ff26d40cf6b3fa7f19cd31fd425 Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/elements/tosca_type_validation.py')
-rw-r--r--tosca2heat/tosca-parser/toscaparser/elements/tosca_type_validation.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/elements/tosca_type_validation.py b/tosca2heat/tosca-parser/toscaparser/elements/tosca_type_validation.py
index 89a6a03..8b49f48 100644
--- a/tosca2heat/tosca-parser/toscaparser/elements/tosca_type_validation.py
+++ b/tosca2heat/tosca-parser/toscaparser/elements/tosca_type_validation.py
@@ -49,12 +49,12 @@ class TypeValidation(object):
for name in custom_type:
if name not in self.ALLOWED_TYPE_SECTIONS:
ExceptionCollector.appendException(
- UnknownFieldError(what='Template ' + (self.import_def),
+ UnknownFieldError(what='Template ' + str(self.import_def),
field=name))
def _validate_type_version(self, version):
if version not in self.VALID_TEMPLATE_VERSIONS:
ExceptionCollector.appendException(
InvalidTemplateVersion(
- what=version + ' in ' + self.import_def,
+ what=version + ' in ' + str(self.import_def),
valid_versions=', '. join(self.VALID_TEMPLATE_VERSIONS)))