jenkins-bot has submitted this change and it was merged.

Change subject: Stop rounding 99.998% up to 100%
......................................................................


Stop rounding 99.998% up to 100%

Reedy has pointed out several times the lols of
"sync-apaches: 100% (ok: 287; fail: 0; left: 1)"

Change-Id: I6262e3fd587d78ea0ff4a0ce9776b31f781d02c1
---
M scap/log.py
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Catrope: Looks good to me, but someone else must approve
  Hashar: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scap/log.py b/scap/log.py
index c4111cb..f185883 100644
--- a/scap/log.py
+++ b/scap/log.py
@@ -7,6 +7,7 @@
 """
 import json
 import logging
+import math
 import logging.handlers
 import re
 import socket
@@ -196,7 +197,7 @@
 
     @property
     def percent_complete(self):
-        return 100.0 * (float(self._done) / max(self._expect, 1))
+        return math.floor(100.0 * (float(self._done) / max(self._expect, 1)))
 
     def expect(self, count):
         """Set expected result count."""

-- 
To view, visit https://gerrit.wikimedia.org/r/155683
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6262e3fd587d78ea0ff4a0ce9776b31f781d02c1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/scap
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>
Gerrit-Reviewer: 20after4 <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to