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'.
|
||||
passfile = self.getconf('remotepassfile', 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()
|
||||
fd.close()
|
||||
return password.encode('UTF-8')
|
||||
|
Loading…
Reference in New Issue
Block a user