mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-21 09:35:35 +01:00
...
This commit is contained in:
parent
ee8de4b180
commit
50bbff2417
1 changed files with 4 additions and 6 deletions
|
|
@ -14,7 +14,7 @@
|
|||
from calibre.ebooks.metadata import MetaInformation
|
||||
from calibre.constants import preferred_encoding, filesystem_encoding, DEBUG
|
||||
from calibre.utils.config import prefs
|
||||
from calibre import prints
|
||||
from calibre import prints, force_unicode, as_unicode
|
||||
|
||||
single_shot = partial(QTimer.singleShot, 75)
|
||||
|
||||
|
|
@ -66,7 +66,8 @@ def walk(self, root):
|
|||
if self.canceled:
|
||||
return
|
||||
self.update.emit(
|
||||
_('Searching in')+' '+dirpath[0])
|
||||
_('Searching in')+' '+force_unicode(dirpath[0],
|
||||
filesystem_encoding))
|
||||
self.books += list(self.db.find_books_in_directory(dirpath[0],
|
||||
self.single_book_per_directory))
|
||||
|
||||
|
|
@ -82,10 +83,7 @@ def run(self):
|
|||
except Exception as err:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
try:
|
||||
msg = unicode(err)
|
||||
except:
|
||||
msg = repr(err)
|
||||
msg = as_unicode(err)
|
||||
self.found.emit(msg)
|
||||
return
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue