fnp
/
librarian.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Verse counters.
[librarian.git]
/
src
/
librarian
/
picture.py
diff --git
a/src/librarian/picture.py
b/src/librarian/picture.py
index
eeb8e8e
..
3897d1a
100644
(file)
--- a/
src/librarian/picture.py
+++ b/
src/librarian/picture.py
@@
-181,7
+181,9
@@
class WLPicture(object):
return [[0, 0], [-1, -1]]
def has_all_props(node, props):
return [[0, 0], [-1, -1]]
def has_all_props(node, props):
- return reduce(and_, map(lambda prop: prop in node.attrib, props))
+ return six.moves.reduce(
+ and_, map(lambda prop: prop in node.attrib, props)
+ )
if not has_all_props(area, ['x1', 'x2', 'y1', 'y2']):
return None
if not has_all_props(area, ['x1', 'x2', 'y1', 'y2']):
return None
@@
-228,7
+230,7
@@
class WLPicture(object):
clip = self.get_sem_coords(k)
self.frame = clip
frm = Element("sem", {"type": "frame"})
clip = self.get_sem_coords(k)
self.frame = clip
frm = Element("sem", {"type": "frame"})
- frm.append(
k.iter("div").next(
))
+ frm.append(
next(k.iter("div")
))
self.edoc.getroot().append(frm)
k.getparent().remove(k)
else:
self.edoc.getroot().append(frm)
k.getparent().remove(k)
else: