core (xml_tools): fixed findAll
- names and namespases arguments haven been inverted to be in the same order as for domish.Element.elements
- fixed bad copy of elements in recursions
- check if childrens are IElements
- namespaces and names can now be basestrings instead of iterables
This commit is contained in:
parent
66e393336b
commit
791be3a4ad
1 changed files with 12 additions and 6 deletions
|
|
@ -282,7 +282,7 @@ class BlogImportPlugin(object):
|
|||
tmp_dir = tempfile.mkdtemp()
|
||||
try:
|
||||
# TODO: would be nice to also update the hyperlinks to these images, e.g. when you have <a href="{url}"><img src="{url}"></a>
|
||||
for img_elt in xml_tools.findAll(top_elt, ['img']):
|
||||
for img_elt in xml_tools.findAll(top_elt, names=[u'img']):
|
||||
yield self.imgFilters(client, img_elt, options, opt_host, tmp_dir)
|
||||
finally:
|
||||
os.rmdir(tmp_dir) # XXX: tmp_dir should be empty, or something went wrong
|
||||
|
|
|
|||
Loading…
Reference in a new issue