diff options
author | zhihui wu <wu.zhihui1@zte.com.cn> | 2017-09-11 01:19:41 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-09-11 01:19:41 +0000 |
commit | b2336bd1742797e0f38063f654646f115dd62e45 (patch) | |
tree | 59038678cb8bca10fda338fff335319bd5ba0ba0 /qtip | |
parent | 4154a75853f6ba004de775194ebffbe00b591012 (diff) | |
parent | 9d52bb9dd0500fa98ce3bdd8142af316adf1804e (diff) |
Merge "Mitigating for missing values in storage QPI."
Diffstat (limited to 'qtip')
-rw-r--r-- | qtip/cli/commands/cmd_qpi.py | 8 |
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) |