Include portalocker in imaplibutil.py
This patch include the usage of portalocker for Windows environments, because fcntl is not available. This patch is related to issue #37, issue 1.
This commit is contained in:
parent
be752838c8
commit
a6fd6b1ded
@ -15,7 +15,6 @@
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
import datetime
|
||||
import os
|
||||
import fcntl
|
||||
import time
|
||||
import subprocess
|
||||
import threading
|
||||
@ -29,6 +28,14 @@ from offlineimap import OfflineImapError
|
||||
from offlineimap.ui import getglobalui
|
||||
from imaplib2 import IMAP4, IMAP4_SSL, InternalDate
|
||||
|
||||
try:
|
||||
import portalocker
|
||||
except:
|
||||
try:
|
||||
import fcntl
|
||||
except:
|
||||
pass # Ok if this fails, we can do without.
|
||||
|
||||
|
||||
class UsefulIMAPMixIn:
|
||||
def __getselectedfolder(self):
|
||||
|
Loading…
Reference in New Issue
Block a user