This commit is contained in:
Kovid Goyal 2021-11-10 09:46:20 +05:30
parent 9de4b76699
commit 8d4966f14b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -94,11 +94,10 @@ class XPathEdit(QWidget, Ui_Edit):
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()