Signed-off-by: Plamen Dimitrov <[email protected]>
---
 client/shared/report.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/client/shared/report.py b/client/shared/report.py
index 5504f06..509b720 100755
--- a/client/shared/report.py
+++ b/client/shared/report.py
@@ -200,8 +200,11 @@ def parse_results_dir(results_dir,
relative_links=True):
     # Now we will account the number of operations and PASS rate
     job_data['operations_executed'] = (job_data['operations_passed'] +
                                        job_data['operations_failed'])
-    job_data['operations_pass_rate'] = float(100 *
-                                            
job_data['operations_passed'] / job_data['operations_executed'])
+    if job_data['operations_executed'] == 0:
+        job_data['operations_pass_rate'] = 100.0
+    else:
+        job_data['operations_pass_rate'] = float(100 *
job_data['operations_passed'] /
+                                                
job_data['operations_executed'])
 
     return job_data
 
-- 
1.8.1.4


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to