Maildir.py split long lines
This patch split long lines in less 80 chars.
This commit is contained in:
parent
646cb4354b
commit
62bfead5e4
@ -37,7 +37,8 @@ class MaildirRepository(BaseRepository):
|
|||||||
self.root = self.getlocalroot()
|
self.root = self.getlocalroot()
|
||||||
self.folders = None
|
self.folders = None
|
||||||
self.ui = getglobalui()
|
self.ui = getglobalui()
|
||||||
self.debug("MaildirRepository initialized, sep is %s" % repr(self.getsep()))
|
self.debug("MaildirRepository initialized, sep is %s" %
|
||||||
|
repr(self.getsep()))
|
||||||
self.folder_atimes = []
|
self.folder_atimes = []
|
||||||
|
|
||||||
# Create the top-level folder if it doesn't exist
|
# Create the top-level folder if it doesn't exist
|
||||||
@ -121,8 +122,10 @@ class MaildirRepository(BaseRepository):
|
|||||||
assert component not in ['new', 'cur', 'tmp'], \
|
assert component not in ['new', 'cur', 'tmp'], \
|
||||||
"When using nested folders (/ as a Maildir separator), " \
|
"When using nested folders (/ as a Maildir separator), " \
|
||||||
"folder names may not contain 'new', 'cur', 'tmp'."
|
"folder names may not contain 'new', 'cur', 'tmp'."
|
||||||
assert foldername.find('../') == -1, "Folder names may not contain ../"
|
assert foldername.find('../') == -1, \
|
||||||
assert not foldername.startswith('/'), "Folder names may not begin with /"
|
"Folder names may not contain ../"
|
||||||
|
assert not foldername.startswith('/'), \
|
||||||
|
"Folder names may not begin with /"
|
||||||
|
|
||||||
# If we're using hierarchical folders, it's possible that
|
# If we're using hierarchical folders, it's possible that
|
||||||
# sub-folders may be created before higher-up ones.
|
# sub-folders may be created before higher-up ones.
|
||||||
@ -160,7 +163,8 @@ class MaildirRepository(BaseRepository):
|
|||||||
if foldername == foldr.name:
|
if foldername == foldr.name:
|
||||||
return foldr
|
return foldr
|
||||||
raise OfflineImapError("getfolder() asked for a nonexisting "
|
raise OfflineImapError("getfolder() asked for a nonexisting "
|
||||||
"folder '%s'." % foldername, OfflineImapError.ERROR.FOLDER)
|
"folder '%s'." % foldername,
|
||||||
|
OfflineImapError.ERROR.FOLDER)
|
||||||
|
|
||||||
def _getfolders_scandir(self, root, extension=None):
|
def _getfolders_scandir(self, root, extension=None):
|
||||||
"""Recursively scan folder 'root'; return a list of MailDirFolder
|
"""Recursively scan folder 'root'; return a list of MailDirFolder
|
||||||
@ -214,7 +218,8 @@ class MaildirRepository(BaseRepository):
|
|||||||
if self.getsep() == '/' and dirname != '':
|
if self.getsep() == '/' and dirname != '':
|
||||||
# Recursively check sub-directories for folders too.
|
# Recursively check sub-directories for folders too.
|
||||||
retval.extend(self._getfolders_scandir(root, foldername))
|
retval.extend(self._getfolders_scandir(root, foldername))
|
||||||
self.debug("_GETFOLDERS_SCANDIR RETURNING %s" % repr([x.getname() for x in retval]))
|
self.debug("_GETFOLDERS_SCANDIR RETURNING %s" %
|
||||||
|
repr([x.getname() for x in retval]))
|
||||||
return retval
|
return retval
|
||||||
|
|
||||||
def getfolders(self):
|
def getfolders(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user