Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
ac22483f
Commit
ac22483f
authored
Aug 24, 2020
by
blitzmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add error handling to the email task within the convert task
parent
59d56d5c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
convert.py
cps/tasks/convert.py
+6
-3
No files found.
cps/tasks/convert.py
View file @
ac22483f
...
...
@@ -32,17 +32,20 @@ class TaskConvert(CalibreTask):
def
run
(
self
,
worker_thread
):
self
.
worker_thread
=
worker_thread
filename
=
self
.
_convert_ebook_format
()
# todo: re-enable this (need to set up gdrive to test with)
if
filename
:
if
config
.
config_use_google_drive
:
gdriveutils
.
updateGdriveCalibreFromLocal
()
if
self
.
kindle_mail
:
# if we're sending to kindle after converting, create a one-off task and run it immediately
# todo: figure out how to incorporate this into the progress
try
:
task
=
TaskEmail
(
self
.
settings
[
'subject'
],
self
.
results
[
"path"
],
filename
,
self
.
settings
,
self
.
kindle_mail
,
self
.
settings
[
'subject'
],
self
.
settings
[
'body'
],
internal
=
True
)
task
.
start
()
except
Exception
as
e
:
return
self
.
_handleError
(
str
(
e
))
self
.
_handleSuccess
()
pass
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment