Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
email
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cubicweb
cubes
email
Commits
68ed45a4a7f1
Commit
68ed45a4a7f1
authored
14 years ago
by
Sylvain Thénault
Browse files
Options
Downloads
Patches
Plain Diff
cleanup
parent
8dc70e2276e2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
entities.py
+1
-0
1 addition, 0 deletions
entities.py
mboximport.py
+5
-5
5 additions, 5 deletions
mboximport.py
with
6 additions
and
5 deletions
entities.py
+
1
−
0
View file @
68ed45a4
...
...
@@ -131,6 +131,7 @@
class
EmailPartIFTIAdapter
(
adapters
.
IFTIndexableAdapter
):
"""
customize EmailPart IFTI adapter so we don
'
t index pgp signature
"""
__select__
=
adapters
.
IFTIndexableAdapter
.
__select__
&
is_instance
(
'
EmailPart
'
)
def
get_words
(
self
):
...
...
This diff is collapsed.
Click to expand it.
mboximport.py
+
5
−
5
View file @
68ed45a4
...
...
@@ -167,6 +167,11 @@
encoding
=
u
'
UTF-8
'
elif
contenttype
==
'
application/pgp-signature
'
:
encoding
=
u
'
ascii
'
if
isinstance
(
data
,
str
):
data
=
unicode
(
data
,
encoding
)
self
.
req
.
set_shared_data
(
'
raw_content_%s_%s
'
%
(
emaileid
,
self
.
_part_index
+
1
),
str
(
part
.
message
))
else
:
encoding
=
None
name
=
part
.
get_filename
()
...
...
@@ -186,6 +191,4 @@
self
.
execute
(
'
SET X attachment Y WHERE X eid %(x)s, Y eid %(y)s
'
,
{
'
x
'
:
emaileid
,
'
y
'
:
epart
.
eid
})
else
:
if
isinstance
(
data
,
str
):
data
=
unicode
(
data
,
encoding
)
self
.
_part_index
+=
1
...
...
@@ -191,7 +194,4 @@
self
.
_part_index
+=
1
self
.
req
.
set_shared_data
(
'
raw_content_%s_%s
'
%
(
emaileid
,
self
.
_part_index
),
str
(
part
.
message
))
epart
=
self
.
req
.
create_entity
(
'
EmailPart
'
,
content
=
data
,
content_format
=
contenttype
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment