mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-22 08:45:42 +01:00
DRYer
This commit is contained in:
parent
9de4b76699
commit
8d4966f14b
1 changed files with 2 additions and 3 deletions
|
|
@ -94,11 +94,10 @@ def xpath(self):
|
|||
return self.text
|
||||
|
||||
def check(self):
|
||||
from calibre.ebooks.oeb.base import XPNSMAP
|
||||
from lxml.etree import XPath
|
||||
from calibre.ebooks.oeb.base import XPath
|
||||
try:
|
||||
if self.text.strip():
|
||||
XPath(self.text, namespaces=XPNSMAP)
|
||||
XPath(self.text)
|
||||
except:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
|
|
|||
Loading…
Reference in a new issue