jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/439526 )
Change subject: [bugfix] Keep category.py compatible for Python 2 and Python 3 ......................................................................
[bugfix] Keep category.py compatible for Python 2 and Python 3
There is a different behaviour between py2 and py3: 5/2 gives 2 in py2 but 2.5 in py3 math.ceil gives a floating number in py2 and int in py 3
Bug: T196865 Change-Id: Ic688ce719ebf686ff9496a8b74377e0b04f27e32 --- M scripts/category.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/category.py b/scripts/category.py index efaeee6..f301bd7 100755 --- a/scripts/category.py +++ b/scripts/category.py @@ -1055,7 +1055,7 @@ # can we can output in two columns? count = len(cat_list) if count > 1 and len(max(cat_list, key=len)) <= 31: - new_column = math.ceil(count / 2) + new_column = int(math.ceil(count / 2.0)) else: new_column = 0
pywikibot-commits@lists.wikimedia.org