ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mxm...@apache.org
Subject [14/32] incubator-ariatosca git commit: Only print description in `service-templates` show if one exists
Date Thu, 06 Apr 2017 08:54:23 GMT
Only print description in `service-templates` show if one exists


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/1c48a6a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/1c48a6a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/1c48a6a1

Branch: refs/heads/logger_task
Commit: 1c48a6a1b1bb7a2dade922508b4f7e27dda9f94f
Parents: 0dacbaf
Author: Avia Efrat <avia@gigaspaces.com>
Authored: Sun Apr 2 18:17:31 2017 +0300
Committer: Ran Ziv <ran@gigaspaces.com>
Committed: Thu Apr 6 11:29:17 2017 +0300

----------------------------------------------------------------------
 aria/cli/commands/service_templates.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/1c48a6a1/aria/cli/commands/service_templates.py
----------------------------------------------------------------------
diff --git a/aria/cli/commands/service_templates.py b/aria/cli/commands/service_templates.py
index 823a6e8..af6252a 100644
--- a/aria/cli/commands/service_templates.py
+++ b/aria/cli/commands/service_templates.py
@@ -61,8 +61,9 @@ def show(service_template_id, model_storage, logger):
     columns = SERVICE_TEMPLATE_COLUMNS + ['#services']
     print_data(columns, service_template_dict, 'Service-template:', max_width=50)
 
-    logger.info('Description:')
-    logger.info('{0}\n'.format(service_template_dict['description'].encode('UTF-8') or ''))
+    if service_template_dict['description'] is not None:
+        logger.info('Description:')
+        logger.info('{0}\n'.format(service_template_dict['description'].encode('UTF-8') or
''))
 
     logger.info('Existing services:')
     logger.info('{0}\n'.format(json.dumps([d['name'] for d in services])))


Mime
View raw message