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 return self.text
def check(self): def check(self):
from calibre.ebooks.oeb.base import XPNSMAP from calibre.ebooks.oeb.base import XPath
from lxml.etree import XPath
try: try:
if self.text.strip(): if self.text.strip():
XPath(self.text, namespaces=XPNSMAP) XPath(self.text)
except: except:
import traceback import traceback
traceback.print_exc() traceback.print_exc()