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.""" name will return the same object."""
# getfolders() will scan and cache the values *if* necessary # getfolders() will scan and cache the values *if* necessary
folders = self.getfolders() folders = self.getfolders()
for folder in folders: for f in folders:
if foldername == folder.name: if foldername == f.name:
return folder return f
raise OfflineImapError("getfolder() asked for a nonexisting " raise OfflineImapError("getfolder() asked for a nonexisting "
"folder '%s'."% foldername, "folder '%s'."% foldername,
OfflineImapError.ERROR.FOLDER) OfflineImapError.ERROR.FOLDER)