summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser/toscaparser/shell.py
diff options
context:
space:
mode:
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/shell.py')
-rw-r--r--tosca2heat/tosca-parser/toscaparser/shell.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/shell.py b/tosca2heat/tosca-parser/toscaparser/shell.py
index 88c7473..c024d1e 100644
--- a/tosca2heat/tosca-parser/toscaparser/shell.py
+++ b/tosca2heat/tosca-parser/toscaparser/shell.py
@@ -53,7 +53,7 @@ class ParserShell(object):
required=True,
help=_('YAML template or CSAR file to parse.'))
- parser.add_argument('-nrpv', dest='no_required_paras_check',
+ parser.add_argument('--nrpv', dest='no_required_paras_check',
action='store_true', default=False,
help=_('Ignore input parameter validation '
'when parse template.'))
@@ -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