mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
pep8
This commit is contained in:
parent
86691f22a2
commit
32fccdb901
@ -32,7 +32,7 @@ class Worker(Thread):
|
|||||||
self.func, self.args = func, args
|
self.func, self.args = func, args
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
#time.sleep(1000)
|
# time.sleep(1000)
|
||||||
try:
|
try:
|
||||||
self.func(*self.args)
|
self.func(*self.args)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@ -208,10 +208,10 @@ class EmailMixin(object): # {{{
|
|||||||
if not components:
|
if not components:
|
||||||
components = [mi.title]
|
components = [mi.title]
|
||||||
subjects.append(os.path.join(*components))
|
subjects.append(os.path.join(*components))
|
||||||
a = authors_to_string(mi.authors if mi.authors else \
|
a = authors_to_string(mi.authors if mi.authors else
|
||||||
[_('Unknown')])
|
[_('Unknown')])
|
||||||
texts.append(_('Attached, you will find the e-book') + \
|
texts.append(_('Attached, you will find the e-book') +
|
||||||
'\n\n' + t + '\n\t' + _('by') + ' ' + a + '\n\n' + \
|
'\n\n' + t + '\n\t' + _('by') + ' ' + a + '\n\n' +
|
||||||
_('in the %s format.') %
|
_('in the %s format.') %
|
||||||
os.path.splitext(f)[1][1:].upper())
|
os.path.splitext(f)[1][1:].upper())
|
||||||
prefix = ascii_filename(t+' - '+a)
|
prefix = ascii_filename(t+' - '+a)
|
||||||
@ -231,7 +231,7 @@ class EmailMixin(object): # {{{
|
|||||||
auto = []
|
auto = []
|
||||||
if _auto_ids != []:
|
if _auto_ids != []:
|
||||||
for id in _auto_ids:
|
for id in _auto_ids:
|
||||||
if specific_format == None:
|
if specific_format is None:
|
||||||
dbfmts = self.library_view.model().db.formats(id, index_is_id=True)
|
dbfmts = self.library_view.model().db.formats(id, index_is_id=True)
|
||||||
formats = [f.lower() for f in (dbfmts.split(',') if dbfmts else
|
formats = [f.lower() for f in (dbfmts.split(',') if dbfmts else
|
||||||
[])]
|
[])]
|
||||||
@ -302,8 +302,9 @@ class EmailMixin(object): # {{{
|
|||||||
sent_mails = email_news(mi, remove,
|
sent_mails = email_news(mi, remove,
|
||||||
get_fmts, self.email_sent, self.job_manager)
|
get_fmts, self.email_sent, self.job_manager)
|
||||||
if sent_mails:
|
if sent_mails:
|
||||||
self.status_bar.show_message(_('Sent news to')+' '+\
|
self.status_bar.show_message(_('Sent news to')+' '+
|
||||||
', '.join(sent_mails), 3000)
|
', '.join(sent_mails), 3000)
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user