~ubuntu-branches/debian/sid/calibre/sid

« back to all changes in this revision

Viewing changes to src/calibre/gui2/dialogs/metadata_bulk.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2014-02-27 07:48:06 UTC
  • mto: This revision was merged to the branch mainline in revision 74.
  • Revision ID: package-import@ubuntu.com-20140227074806-64wdebb3ptosxhhx
Tags: upstream-1.25.0+dfsg
ImportĀ upstreamĀ versionĀ 1.25.0+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
794
794
        flags |= re.UNICODE
795
795
 
796
796
        try:
 
797
            stext = unicode(self.search_for.text())
 
798
            if not stext:
 
799
                raise Exception(_('You must specify a search expression in the "Search for" field'))
797
800
            if self.search_mode.currentIndex() == 0:
798
 
                self.s_r_obj = re.compile(re.escape(unicode(self.search_for.text())), flags)
 
801
                self.s_r_obj = re.compile(re.escape(stext), flags)
799
802
            else:
800
 
                self.s_r_obj = re.compile(unicode(self.search_for.text()), flags)
 
803
                self.s_r_obj = re.compile(stext, flags)
801
804
        except Exception as e:
802
805
            self.s_r_obj = None
803
806
            self.s_r_error = e