aboutsummaryrefslogtreecommitdiffstats
path: root/qtip
diff options
context:
space:
mode:
authorTaseer Ahmed <taseer94@gmail.com>2017-09-06 12:15:22 +0500
committerTaseer Ahmed <taseer94@gmail.com>2017-09-07 10:34:01 +0500
commit9d52bb9dd0500fa98ce3bdd8142af316adf1804e (patch)
treea68ee62e96639b891db2d349e23b0b540a2c1787 /qtip
parent9ac9231cf1876719ca15f681a8fae667343a8c77 (diff)
Mitigating for missing values in storage QPI.
- Update unit tests Change-Id: I7bfe89dc6bbe1cafe13b2f3e4f9356a06a59c68b Signed-off-by: Taseer Ahmed <taseer94@gmail.com>
Diffstat (limited to 'qtip')
-rw-r--r--qtip/cli/commands/cmd_qpi.py8
1 files changed, 6 insertions, 2 deletions
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)