Hi,
On 2016-06-23 04:51, Ken McDonell wrote:
> I am seeing the qa/1069 test failing the divide by zero test when pmrep
> reports 0.inf instead of inf.
>
> The test not failing everywhere, but is failing on RHEL 6.8 (vm28) and
> CentOS 6.7 (vm14).
This looks like a RHEL 6 Python issue:
https://bugzilla.redhat.com/show_bug.cgi?id=1350209
We can work around it in pmrep, the patch is not that pretty but does
the trick:
---
src/pmrep/pmrep.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/pmrep/pmrep.py b/src/pmrep/pmrep.py
index b0dc282..430f894 100755
--- a/src/pmrep/pmrep.py
+++ b/src/pmrep/pmrep.py
@@ -1299,6 +1299,8 @@ class PMReporter(object):
index = 0
nfmt = ""
for f in fmt:
+ if type(line[index]) is float and math.isinf(line[index]):
+ line[index] = "inf"
nfmt += f.replace("{X:", "{" + str(index) + ":")
index += 1
nfmt += "{" + str(index) + "}"
Thanks,
--
Marko Myllynen
|