Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pymilter-suspicious-from
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
misc
pymilter-suspicious-from
Commits
907f0fe7
Commit
907f0fe7
authored
5 years ago
by
Jan Philipp Timme
Browse files
Options
Downloads
Patches
Plain Diff
Fix error handling for decoding errors
parent
eb1fa146
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
main.py
+1
-1
1 addition, 1 deletion
main.py
with
1 addition
and
1 deletion
main.py
+
1
−
1
View file @
907f0fe7
...
@@ -34,7 +34,7 @@ def get_decoded_header(value):
...
@@ -34,7 +34,7 @@ def get_decoded_header(value):
for
item
in
decoded_header_items
:
for
item
in
decoded_header_items
:
decoded_item
=
item
[
0
].
decode
(
item
[
1
])
if
item
[
1
]
is
not
None
else
item
[
0
]
decoded_item
=
item
[
0
].
decode
(
item
[
1
])
if
item
[
1
]
is
not
None
else
item
[
0
]
if
isinstance
(
decoded_item
,
bytes
):
if
isinstance
(
decoded_item
,
bytes
):
decoded_item
=
decoded_item
.
decode
(
'
ascii
'
)
decoded_item
=
decoded_item
.
decode
(
'
ascii
'
,
'
replace
'
)
decoded_header_value
+=
decoded_item
decoded_header_value
+=
decoded_item
return
decoded_header_value
return
decoded_header_value
...
...
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