summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser
diff options
context:
space:
mode:
Diffstat (limited to 'tosca2heat/tosca-parser')
-rw-r--r--tosca2heat/tosca-parser/toscaparser/shell.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/shell.py b/tosca2heat/tosca-parser/toscaparser/shell.py
index 88c7473..83a015c 100644
--- a/tosca2heat/tosca-parser/toscaparser/shell.py
+++ b/tosca2heat/tosca-parser/toscaparser/shell.py
@@ -97,9 +97,10 @@ class ParserShell(object):
else:
raise e
- version = tosca.version if tosca else "unknown"
- if tosca and tosca.version:
- print("\nversion: " + version)
+ if tosca and hasattr(tosca, 'version'):
+ print("\nversion: " + tosca.version)
+ else:
+ print("\nversion: " + "unknown")
if tosca and hasattr(tosca, 'description'):
description = tosca.description