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
f4ddac16
Commit
f4ddac16
authored
Mar 21, 2021
by
Ozzie Isaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved error logging for #1905
parent
33bdc07f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
mail.py
cps/tasks/mail.py
+2
-4
No files found.
cps/tasks/mail.py
View file @
f4ddac16
...
@@ -169,8 +169,8 @@ class TaskEmail(CalibreTask):
...
@@ -169,8 +169,8 @@ class TaskEmail(CalibreTask):
except
(
MemoryError
)
as
e
:
except
(
MemoryError
)
as
e
:
log
.
debug_or_exception
(
e
)
log
.
debug_or_exception
(
e
)
self
.
_handleError
(
u'MemoryError sending email: '
+
str
(
e
))
self
.
_handleError
(
u'MemoryError sending email: '
+
str
(
e
))
# return None
except
(
smtplib
.
SMTPException
,
smtplib
.
SMTPAuthenticationError
)
as
e
:
except
(
smtplib
.
SMTPException
,
smtplib
.
SMTPAuthenticationError
)
as
e
:
log
.
debug_or_exception
(
e
)
if
hasattr
(
e
,
"smtp_error"
):
if
hasattr
(
e
,
"smtp_error"
):
text
=
e
.
smtp_error
.
decode
(
'utf-8'
)
.
replace
(
"
\n
"
,
'. '
)
text
=
e
.
smtp_error
.
decode
(
'utf-8'
)
.
replace
(
"
\n
"
,
'. '
)
elif
hasattr
(
e
,
"message"
):
elif
hasattr
(
e
,
"message"
):
...
@@ -178,13 +178,11 @@ class TaskEmail(CalibreTask):
...
@@ -178,13 +178,11 @@ class TaskEmail(CalibreTask):
elif
hasattr
(
e
,
"args"
):
elif
hasattr
(
e
,
"args"
):
text
=
'
\n
'
.
join
(
e
.
args
)
text
=
'
\n
'
.
join
(
e
.
args
)
else
:
else
:
log
.
debug_or_exception
(
e
)
text
=
''
text
=
''
self
.
_handleError
(
u'Smtplib Error sending email: '
+
text
)
self
.
_handleError
(
u'Smtplib Error sending email: '
+
text
)
# return None
except
(
socket
.
error
)
as
e
:
except
(
socket
.
error
)
as
e
:
log
.
debug_or_exception
(
e
)
self
.
_handleError
(
u'Socket Error sending email: '
+
e
.
strerror
)
self
.
_handleError
(
u'Socket Error sending email: '
+
e
.
strerror
)
# return None
@
property
@
property
...
...
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