mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-09 22:38:19 +02:00
possible fix for python3 maildir issue
This commit is contained in:
parent
f706cacd27
commit
55be6b37f2
1 changed files with 7 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import sys
|
||||
import six
|
||||
|
||||
from .base import EmailTransport
|
||||
|
||||
|
|
@ -9,9 +10,12 @@ class GenericFileMailbox(EmailTransport):
|
|||
|
||||
def __init__(self, path):
|
||||
super(GenericFileMailbox, self).__init__()
|
||||
self._path = path.encode(
|
||||
sys.getfilesystemencoding()
|
||||
)
|
||||
if six.PY2:
|
||||
self._path = path.encode(
|
||||
sys.getfilesystemencoding()
|
||||
)
|
||||
else:
|
||||
self._path = path
|
||||
|
||||
def get_instance(self):
|
||||
return self._variant(self._path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue