[library-web] adapt xpaths used to find elements in overlay to current ElementTree



commit 3e253530b2cf14f6a56715e8351f29ab2d108a12
Author: Frédéric Péters <fpeters 0d be>
Date:   Sat Sep 6 10:05:42 2014 +0200

    adapt xpaths used to find elements in overlay to current ElementTree

 src/overlay.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/overlay.py b/src/overlay.py
index 0cb9778..9e3b609 100644
--- a/src/overlay.py
+++ b/src/overlay.py
@@ -81,7 +81,7 @@ class Overlay:
 
         self.create_extra_wiki_docs()
 
-        for doc in self.tree.findall('/documents/document'):
+        for doc in self.tree.findall('./documents/document'):
             if 'doc_module' in doc.attrib:
                 # modifying an existing document
                 self.modified_docs[(
@@ -105,13 +105,13 @@ class Overlay:
                     self.extra_devel_releases[(doc_module, extra)] = True
 
         self.toc_mapping = {}
-        for mapping in self.tree.findall('/subsections/map'):
+        for mapping in self.tree.findall('./subsections/map'):
             channel = mapping.attrib.get('channel')
             sectionid = mapping.attrib.get('id')
             subsection = mapping.attrib.get('subsection')
             self.toc_mapping[(channel, sectionid)] = subsection
 
-        for quirks in self.tree.findall('/quirks'):
+        for quirks in self.tree.findall('./quirks'):
             self.quirks[(quirks.attrib['doc_module'], quirks.attrib['channel'])] = quirks
 
     def create_extra_wiki_docs(self):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]