From 9d52bb9dd0500fa98ce3bdd8142af316adf1804e Mon Sep 17 00:00:00 2001 From: Taseer Ahmed Date: Wed, 6 Sep 2017 12:15:22 +0500 Subject: Mitigating for missing values in storage QPI. - Update unit tests Change-Id: I7bfe89dc6bbe1cafe13b2f3e4f9356a06a59c68b Signed-off-by: Taseer Ahmed --- qtip/cli/commands/cmd_qpi.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'qtip') diff --git a/qtip/cli/commands/cmd_qpi.py b/qtip/cli/commands/cmd_qpi.py index 4865b7ae..a2802032 100644 --- a/qtip/cli/commands/cmd_qpi.py +++ b/qtip/cli/commands/cmd_qpi.py @@ -44,6 +44,10 @@ def show(name): with open('{}/{}.yaml'.format(QPI_PATH, name)) as conf: qpi = yaml.safe_load(conf) for section in qpi['sections']: - table.add_row([section['name'], section['description'], - section['formula']]) + try: + table.add_row([section['name'], section['description'], + section['formula']]) + except Exception: + table.add_row([section['name'], section['description'], + 'Not Available']) click.echo(table) -- cgit 1.2.3-korg