Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
email
Commits
340b6f710548
Commit
f4b9d540
authored
Dec 18, 2015
by
David Douard
Browse files
[hooks] fix AnalyzeEmailText: Email.subject can be None
parent
7bca38df4593
Changes
1
Hide whitespace changes
Inline
Side-by-side
hooks.py
View file @
340b6f71
...
...
@@ -72,7 +72,7 @@ class AnalyzeEmailText(hook.Operation):
"""check if there are some change state instruction in the mail content"""
def
precommit_event
(
self
):
text
=
self
.
email
.
subject
text
=
self
.
email
.
subject
or
u
''
for
part
in
self
.
email
.
parts_in_order
(
prefered_mime_type
=
'text/plain'
):
try
:
text
+=
' '
+
part
.
actual_content
()
...
...
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