IMAP.py should use encoding to read the file
This patch includes the word "encoding" to select the right argument in remotepassfile.
This commit is contained in:
parent
cbbeebbf44
commit
5033340c2f
@ -398,7 +398,7 @@ class IMAPRepository(BaseRepository):
|
|||||||
# 3. Read password from file specified in Repository 'remotepassfile'.
|
# 3. Read password from file specified in Repository 'remotepassfile'.
|
||||||
passfile = self.getconf('remotepassfile', None)
|
passfile = self.getconf('remotepassfile', None)
|
||||||
if passfile is not None:
|
if passfile is not None:
|
||||||
fd = open(os.path.expanduser(passfile), 'r', 'utf-8')
|
fd = open(os.path.expanduser(passfile), 'r', encoding='utf-8')
|
||||||
password = fd.readline().strip()
|
password = fd.readline().strip()
|
||||||
fd.close()
|
fd.close()
|
||||||
return password.encode('UTF-8')
|
return password.encode('UTF-8')
|
||||||
|
Loading…
Reference in New Issue
Block a user