projects
/
pgweb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1a5cf4
)
Fix message preview in mailqueue model
author
Magnus Hagander
<magnus@hagander.net>
Fri, 3 Jul 2020 15:51:01 +0000
(17:51 +0200)
committer
Magnus Hagander
<magnus@hagander.net>
Fri, 3 Jul 2020 16:05:47 +0000
(18:05 +0200)
UTF8 encoding issues since the python3 migration...
pgweb/mailqueue/admin.py
patch
|
blob
|
blame
|
history
diff --git
a/pgweb/mailqueue/admin.py
b/pgweb/mailqueue/admin.py
index 6b89205cc970c8f1e1122d6a0d55fb8c2dc6b657..468283b6036778975cc5114de0d840f26fe71e77 100644
(file)
--- a/
pgweb/mailqueue/admin.py
+++ b/
pgweb/mailqueue/admin.py
@@
-17,13
+17,13
@@
class QueuedMailAdmin(admin.ModelAdmin):
msg = parser.parsestr(obj.fullmsg)
b = msg.get_payload(decode=True)
if b:
- return b
+ return b
.decode('utf8')
pl = msg.get_payload()
for p in pl:
b = p.get_payload(decode=True)
if b:
- return b
+ return b
.decode('utf8')
return "Could not find body"
except Exception as e:
return "Failed to get body: %s" % e