mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-30 00:36:14 +01:00
use floor division instead of math.floor
This commit is contained in:
parent
4b280adcc9
commit
8b75e8c3e3
1 changed files with 2 additions and 2 deletions
|
|
@ -9,7 +9,7 @@
|
|||
assumes a prior call to the flatcss transform.
|
||||
'''
|
||||
|
||||
import os, math, functools, collections, re, copy
|
||||
import os, functools, collections, re, copy
|
||||
from collections import OrderedDict
|
||||
|
||||
from lxml.etree import XPath as _XPath
|
||||
|
|
@ -390,7 +390,7 @@ def pick_elem(elems):
|
|||
elems = [i for i in elems if i.get(SPLIT_POINT_ATTR, '0') !=
|
||||
'1']
|
||||
if elems:
|
||||
i = int(math.floor(len(elems)/2.))
|
||||
i = int(len(elems)//2)
|
||||
elems[i].set(SPLIT_POINT_ATTR, '1')
|
||||
return elems[i]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue