Merge pull request #6 from kuttti/master

Update imapbackup.py
This commit is contained in:
Rui Carmo 2018-12-12 13:55:04 +00:00 committed by GitHub
commit a0fa6076d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -707,7 +707,8 @@ def _fixed_socket_read(self, size=-1):
# Platform detection to enable socket patch
if 'Darwin' in platform.platform() and '2.3.5' == platform.python_version():
socket._fileobject.read = _fixed_socket_read
if 'Windows' in platform.platform():
# 20181212: Windows 10 + Python 2.7 doesn't need this fix (fix leads to error: object of type 'cStringIO.StringO' has no len())
if 'Windows' in platform.platform() and '2.3.5' == platform.python_version():
socket._fileobject.read = _fixed_socket_read
if __name__ == '__main__':