bisect-kit: fix exception in bisector 'view' subcommand
If bisect failed, probability information is unavailable.
BUG=None
TEST=None
Change-Id: Ia4adcb05828a7500a87642e8ba7a68a5ae49b9ab
Reviewed-on: https://chromium-review.googlesource.com/1480793
Commit-Ready: Kuang-che Wu <kcwu@chromium.org>
Tested-by: Kuang-che Wu <kcwu@chromium.org>
Reviewed-by: Chung-yih Wang <cywang@chromium.org>
Reviewed-by: Chi-Ngai Wan <cnwan@google.com>
diff --git a/bisect_kit/cli.py b/bisect_kit/cli.py
index 2bd48f0..2b83c6b 100644
--- a/bisect_kit/cli.py
+++ b/bisect_kit/cli.py
@@ -574,7 +574,7 @@
continue
detail = []
- if self.strategy.is_noisy():
+ if self.strategy.is_noisy() and summary['prob']:
detail.append('%.4f%%' % (summary['prob'][i] * 100))
if rev_info['result_counter']:
detail.append(str(rev_info['result_counter']))