From: Marcin Koziej Date: Wed, 6 Feb 2013 13:42:56 +0000 (+0100) Subject: Don't call super cause it makes little sense X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/45aed036278c98bda04414dfd6f216bc5d2f7586?hp=723bbca1bfd747722ee2ccd1ae1b262c497144de Don't call super cause it makes little sense fix searching for luki/zastap tags --- 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']