mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-10 06:48:19 +02:00
Modernize syntax, drop Python<3, drop Django<1.11
This commit is contained in:
parent
d114008645
commit
84c99afa03
42 changed files with 176 additions and 330 deletions
|
|
@ -1,5 +1,3 @@
|
|||
import six
|
||||
|
||||
from poplib import POP3, POP3_SSL
|
||||
|
||||
from .base import EmailTransport, MessageParseError
|
||||
|
|
@ -24,9 +22,7 @@ class Pop3Transport(EmailTransport):
|
|||
self.server.pass_(password)
|
||||
|
||||
def get_message_body(self, message_lines):
|
||||
if six.PY3:
|
||||
return six.binary_type('\r\n', 'ascii').join(message_lines)
|
||||
return '\r\n'.join(message_lines)
|
||||
return bytes('\r\n', 'ascii').join(message_lines)
|
||||
|
||||
def get_message(self, condition=None):
|
||||
message_count = len(self.server.list()[1])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue