repository/Maildir.py: use f variable instead of folder

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht 2015-01-08 22:28:45 +01:00
parent 0dc45e421b
commit 594a286888

View File

@ -130,9 +130,9 @@ class MaildirRepository(BaseRepository):
name will return the same object."""
# getfolders() will scan and cache the values *if* necessary
folders = self.getfolders()
for folder in folders:
if foldername == folder.name:
return folder
for f in folders:
if foldername == f.name:
return f
raise OfflineImapError("getfolder() asked for a nonexisting "
"folder '%s'."% foldername,
OfflineImapError.ERROR.FOLDER)