From 45aed036278c98bda04414dfd6f216bc5d2f7586 Mon Sep 17 00:00:00 2001 From: Marcin Koziej Date: Wed, 6 Feb 2013 14:42:56 +0100 Subject: [PATCH 1/1] Don't call super cause it makes little sense fix searching for luki/zastap tags --- librarian/pyhtml.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/librarian/pyhtml.py b/librarian/pyhtml.py index bed9798..e5ca40e 100644 --- a/librarian/pyhtml.py +++ b/librarian/pyhtml.py @@ -302,7 +302,8 @@ Overrides the returned content default handle_pytanie class Luki(Exercise): def find_pieces(self, question): - return question.xpath("//luka") + print question.xpath(".//luka") + return question.xpath(".//luka") def solution_html(self, piece): return piece.text + ''.join( @@ -325,8 +326,7 @@ class Luki(Exercise): return qpre, qpost def handle_opis(self, element): - pre, post = super(Luki, self).handle_opis(element) - return pre, self.words_html + post + return '', self.words_html def handle_luka(self, element): self.piece_counter += 1 @@ -335,7 +335,7 @@ class Luki(Exercise): class Zastap(Luki): def find_pieces(self, question): - return question.xpath("//zastap") + return question.xpath(".//zastap") def solution_html(self, piece): return piece.attrib['rozw'] -- 2.20.1