From 8d4966f14b8725b49bbc0b4aae4da94efaa11b6a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 10 Nov 2021 09:46:20 +0530 Subject: [PATCH] DRYer --- src/calibre/gui2/convert/xpath_wizard.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/convert/xpath_wizard.py b/src/calibre/gui2/convert/xpath_wizard.py index 81bd317e1c..3a43ffffc2 100644 --- a/src/calibre/gui2/convert/xpath_wizard.py +++ b/src/calibre/gui2/convert/xpath_wizard.py @@ -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()