mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
383b15e254
commit
10f4b48d68
@ -46,9 +46,8 @@ class SearchAndReplaceWidget(Widget, Ui_Form):
|
|||||||
for x in ('sr1_search', 'sr2_search', 'sr3_search'):
|
for x in ('sr1_search', 'sr2_search', 'sr3_search'):
|
||||||
x = getattr(self, 'opt_'+x)
|
x = getattr(self, 'opt_'+x)
|
||||||
try:
|
try:
|
||||||
pat = unicode(x.regex).strip()
|
pat = unicode(x.regex)
|
||||||
if pat:
|
re.compile(pat)
|
||||||
re.compile(pat)
|
|
||||||
except Exception, err:
|
except Exception, err:
|
||||||
error_dialog(self, _('Invalid regular expression'),
|
error_dialog(self, _('Invalid regular expression'),
|
||||||
_('Invalid regular expression: %s')%err, show=True)
|
_('Invalid regular expression: %s')%err, show=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user